当前位置: 首页>>代码示例>>PHP>>正文


PHP Zend_Ldap_Dn::explodeDn方法代码示例

本文整理汇总了PHP中Zend_Ldap_Dn::explodeDn方法的典型用法代码示例。如果您正苦于以下问题:PHP Zend_Ldap_Dn::explodeDn方法的具体用法?PHP Zend_Ldap_Dn::explodeDn怎么用?PHP Zend_Ldap_Dn::explodeDn使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Zend_Ldap_Dn的用法示例。


在下文中一共展示了Zend_Ldap_Dn::explodeDn方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: testDnWithMultiValuedRdnRoundTrip

 public function testDnWithMultiValuedRdnRoundTrip()
 {
     $dn1 = 'cn=Surname\\, Firstname+uid=userid,cn=name2,dc=example,dc=org';
     $dnArray = Zend_Ldap_Dn::explodeDn($dn1);
     $dn2 = Zend_Ldap_Dn::implodeDn($dnArray);
     $this->assertEquals($dn1, $dn2);
 }
开发者ID:SustainableCoastlines,项目名称:loveyourwater,代码行数:7,代码来源:ImplodingTest.php

示例2: getDomainConfiguration

 /**
  * fetch domain config with domain sid and name
  *
  * @throws Tinebase_Exception_Backend_Ldap
  * @throws Zend_Ldap_Exception
  * @return array
  *
  * TODO cache this longer?
  */
 public function getDomainConfiguration()
 {
     if ($this->_domainConfig === null) {
         $this->_domainConfig = $this->getLdap()->search('objectClass=domain', $this->getLdap()->getFirstNamingContext(), Zend_Ldap::SEARCH_SCOPE_BASE)->getFirst();
         $this->_domainConfig['domainSidBinary'] = $this->_domainConfig['objectsid'][0];
         $this->_domainConfig['domainSidPlain'] = Tinebase_Ldap::decodeSid($this->_domainConfig['objectsid'][0]);
         $domainNameParts = array();
         $keys = null;
         // not really needed
         Zend_Ldap_Dn::explodeDn($this->_domainConfig['distinguishedname'][0], $keys, $domanNameParts);
         $this->_domainConfig['domainName'] = implode('.', $domainNameParts);
     }
     return $this->_domainConfig;
 }
开发者ID:ingoratsdorf,项目名称:Tine-2.0-Open-Source-Groupware-and-CRM,代码行数:23,代码来源:DomainConfigurationTrait.php

示例3: copy

 /**
  * Copies a LDAP entry from one DN to another DN.
  *
  * @param  string|Zend_Ldap_Dn $from
  * @param  string|Zend_Ldap_Dn $to
  * @param  boolean             $recursively
  * @return Zend_Ldap Provides a fluid interface
  * @throws Zend_Ldap_Exception
  */
 public function copy($from, $to, $recursively = false)
 {
     $entry = $this->getEntry($from, array(), true);
     if ($to instanceof Zend_Ldap_Dn) {
         $toDnParts = $to->toArray();
     } else {
         $toDnParts = Zend_Ldap_Dn::explodeDn($to);
     }
     $this->add($to, $entry);
     if ($recursively === true && $this->countChildren($from) > 0) {
         $children = $this->_getChildrenDns($from);
         foreach ($children as $c) {
             $cDnParts = Zend_Ldap_Dn::explodeDn($c);
             $newChildParts = array_merge(array(array_shift($cDnParts)), $toDnParts);
             $newChild = Zend_Ldap_Dn::implodeDn($newChildParts);
             $this->copy($c, $newChild, true);
         }
     }
     return $this;
 }
开发者ID:jpbender,项目名称:mage_virtual,代码行数:29,代码来源:Ldap.php

示例4: testExplodeDnsProvidedByRFC2253

 /**
  * @dataProvider rfc2253DnProvider
  */
 public function testExplodeDnsProvidedByRFC2253($input, $expected)
 {
     $dnArray = Zend_Ldap_Dn::explodeDn($input);
     $this->assertEquals($expected, $dnArray);
 }
开发者ID:sasezaki,项目名称:mirror-zf1-tests,代码行数:8,代码来源:ExplodingTest.php

示例5: testGetDnArray

 public function testGetDnArray()
 {
     $data = $this->_createTestArrayData();
     $node = Zend_Ldap_Node::fromArray($data);
     $exA = Zend_Ldap_Dn::explodeDn($data['dn']);
     $this->assertEquals($exA, $node->getDnArray());
 }
开发者ID:netvlies,项目名称:zf,代码行数:7,代码来源:OfflineTest.php

示例6: __construct

 /**
  * the constructor
  *
  * @param  array  $_options  Options used in connecting, binding, etc.
  * @throws Tinebase_Exception_Backend_Ldap
  */
 public function __construct(array $_options = array())
 {
     if (empty($_options['userUUIDAttribute'])) {
         $_options['userUUIDAttribute'] = 'objectGUID';
     }
     if (empty($_options['groupUUIDAttribute'])) {
         $_options['groupUUIDAttribute'] = 'objectGUID';
     }
     if (empty($_options['baseDn'])) {
         $_options['baseDn'] = $_options['userDn'];
     }
     if (empty($_options['userFilter'])) {
         $_options['userFilter'] = 'objectclass=user';
     }
     if (empty($_options['userSearchScope'])) {
         $_options['userSearchScope'] = Zend_Ldap::SEARCH_SCOPE_SUB;
     }
     if (empty($_options['groupFilter'])) {
         $_options['groupFilter'] = 'objectclass=group';
     }
     parent::__construct($_options);
     if ($this->_options['useRfc2307']) {
         $this->_requiredObjectClass[] = 'posixAccount';
         $this->_requiredObjectClass[] = 'shadowAccount';
         $this->_rowNameMapping['accountHomeDirectory'] = 'unixhomedirectory';
         $this->_rowNameMapping['accountLoginShell'] = 'loginshell';
     }
     // get domain sid
     $this->_domainConfig = $this->_ldap->search('objectClass=domain', $this->_ldap->getFirstNamingContext(), Zend_Ldap::SEARCH_SCOPE_BASE)->getFirst();
     $this->_domainSidBinary = $this->_domainConfig['objectsid'][0];
     $this->_domainSidPlain = Tinebase_Ldap::decodeSid($this->_domainConfig['objectsid'][0]);
     $domanNameParts = array();
     $keys = null;
     // not really needed
     Zend_Ldap_Dn::explodeDn($this->_domainConfig['distinguishedname'][0], $keys, $domanNameParts);
     $this->_domainName = implode('.', $domanNameParts);
 }
开发者ID:bitExpert,项目名称:Tine-2.0-Open-Source-Groupware-and-CRM,代码行数:43,代码来源:ActiveDirectory.php


注:本文中的Zend_Ldap_Dn::explodeDn方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。