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


PHP Zend_Ldap::getEntry方法代码示例

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


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

示例1: create

 /**
  * Factory method to create the RootDSE.
  *
  * @param  Zend_Ldap $ldap
  * @return Zend_Ldap_Node_RootDse
  * @throws Zend_Ldap_Exception
  */
 public static function create(Zend_Ldap $ldap)
 {
     $dn = Zend_Ldap_Dn::fromString('');
     $data = $ldap->getEntry($dn, array('*', '+'), true);
     if (isset($data['domainfunctionality'])) {
         /**
          * @see Zend_Ldap_Node_RootDse_ActiveDirectory
          */
         require_once 'Zend/Ldap/Node/RootDse/ActiveDirectory.php';
         return new Zend_Ldap_Node_RootDse_ActiveDirectory($dn, $data);
     } else {
         if (isset($data['dsaname'])) {
             /**
              * @see Zend_Ldap_Node_RootDse_ActiveDirectory
              */
             require_once 'Zend/Ldap/Node/RootDse/eDirectory.php';
             return new Zend_Ldap_Node_RootDse_eDirectory($dn, $data);
         } else {
             if (isset($data['structuralobjectclass']) && $data['structuralobjectclass'][0] === 'OpenLDAProotDSE') {
                 /**
                  * @see Zend_Ldap_Node_RootDse_OpenLdap
                  */
                 require_once 'Zend/Ldap/Node/RootDse/OpenLdap.php';
                 return new Zend_Ldap_Node_RootDse_OpenLdap($dn, $data);
             } else {
                 return new self($dn, $data);
             }
         }
     }
 }
开发者ID:ki8asui,项目名称:isography,代码行数:37,代码来源:RootDse.php

示例2: create

 /**
  * Factory method to create the Schema node.
  *
  * @param  Zend_Ldap $ldap
  * @return Zend_Ldap_Node_Schema
  * @throws Zend_Ldap_Exception
  */
 public static function create(Zend_Ldap $ldap)
 {
     $dn = $ldap->getRootDse()->getSchemaDn();
     $data = $ldap->getEntry($dn, array('*', '+'), true);
     switch ($ldap->getRootDse()->getServerType()) {
         case Zend_Ldap_Node_RootDse::SERVER_TYPE_ACTIVEDIRECTORY:
             /**
              * @see Zend_Ldap_Node_Schema_ActiveDirectory
              */
             return new Zend_Ldap_Node_Schema_ActiveDirectory($dn, $data, $ldap);
         case Zend_Ldap_Node_RootDse::SERVER_TYPE_OPENLDAP:
             /**
              * @see Zend_Ldap_Node_RootDse_ActiveDirectory
              */
             return new Zend_Ldap_Node_Schema_OpenLdap($dn, $data, $ldap);
         case Zend_Ldap_Node_RootDse::SERVER_TYPE_EDIRECTORY:
         default:
             return new self($dn, $data, $ldap);
     }
 }
开发者ID:kobmaki,项目名称:icingaweb2,代码行数:27,代码来源:Schema.php

示例3: fromLdap

 /**
  * Factory method to create an attached Zend_Ldap_Node for a given DN.
  *
  * @param  string|array|Zend_Ldap_Dn $dn
  * @param  Zend_Ldap                 $ldap
  * @return Zend_Ldap_Node|null
  * @throws Zend_Ldap_Exception
  */
 public static function fromLdap($dn, Zend_Ldap $ldap)
 {
     if (is_string($dn) || is_array($dn)) {
         $dn = Zend_Ldap_Dn::factory($dn);
     } else {
         if ($dn instanceof Zend_Ldap_Dn) {
             $dn = clone $dn;
         } else {
             /**
              * @see Zend_Ldap_Exception
              */
             require_once PHP_LIBRARY_PATH . 'Zend/Ldap/Exception.php';
             throw new Zend_Ldap_Exception(null, '$dn is of a wrong data type.');
         }
     }
     $data = $ldap->getEntry($dn, array('*', '+'), true);
     if ($data === null) {
         return null;
     }
     $entry = new self($dn, $data, true, $ldap);
     return $entry;
 }
开发者ID:netixx,项目名称:Stock,代码行数:30,代码来源:Node.php

示例4: _loadUser

 /**
  * This function takes care of loading the user from LDAP
  * @param String $userId
  * @return false if the data is not present, or an array containing the data.
  */
 protected function _loadUser($userId)
 {
     $user = $this->_ldap->getEntry($this->_getDNForUserId($userId));
     return $user;
 }
开发者ID:RKathees,项目名称:is-connectors,代码行数:10,代码来源:Ldap.php


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