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


PHP Ldap::getEntry方法代码示例

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


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

示例1: reload

 /**
  * Reload node attributes from LDAP.
  *
  * This is an online method.
  *
  * @param  \Zend\Ldap\Ldap $ldap
  * @return AbstractNode Provides a fluid interface
  */
 public function reload(Ldap\Ldap $ldap = null)
 {
     if ($ldap !== null) {
         $data = $ldap->getEntry($this->_getDn(), array('*', '+'), true);
         $this->loadData($data, true);
     }
     return $this;
 }
开发者ID:idwsdta,项目名称:INIT-frame,代码行数:16,代码来源:AbstractNode.php

示例2: create

 /**
  * Factory method to create the RootDse.
  *
  * @param \Zend\Ldap\Ldap $ldap
  * @return RootDse
  */
 public static function create(Ldap\Ldap $ldap)
 {
     $dn = Ldap\Dn::fromString('');
     $data = $ldap->getEntry($dn, ['*', '+'], true);
     if (isset($data['domainfunctionality'])) {
         return new RootDse\ActiveDirectory($dn, $data);
     } elseif (isset($data['dsaname'])) {
         return new RootDse\eDirectory($dn, $data);
     } elseif (isset($data['structuralobjectclass']) && $data['structuralobjectclass'][0] === 'OpenLDAProotDSE') {
         return new RootDse\OpenLdap($dn, $data);
     }
     return new static($dn, $data);
 }
开发者ID:GeeH,项目名称:zend-ldap,代码行数:19,代码来源:RootDse.php

示例3: create

 /**
  * Factory method to create the Schema node.
  *
  * @param  \Zend\Ldap\Ldap $ldap
  * @return \Zend\Ldap\Node\Schema
  * @throws \Zend\Ldap\Exception
  */
 public static function create(Ldap\Ldap $ldap)
 {
     $dn = $ldap->getRootDse()->getSchemaDn();
     $data = $ldap->getEntry($dn, array('*', '+'), true);
     switch ($ldap->getRootDse()->getServerType()) {
         case RootDSE::SERVER_TYPE_ACTIVEDIRECTORY:
             return new Schema\ActiveDirectory($dn, $data, $ldap);
         case RootDSE::SERVER_TYPE_OPENLDAP:
             return new Schema\OpenLdap($dn, $data, $ldap);
         case RootDSE::SERVER_TYPE_EDIRECTORY:
         default:
             return new self($dn, $data, $ldap);
     }
 }
开发者ID:rexmac,项目名称:zf2,代码行数:21,代码来源:Schema.php

示例4: findByUsername

 public function findByUsername($username)
 {
     $this->bind();
     $entryDN = "uid={$username}," . $this->active_server['baseDn'];
     $this->log("Attempting to get username entry: {$entryDN} against the active ldap server");
     try {
         $hm = $this->ldap->getEntry($entryDN);
         $this->log("Raw Ldap Object: " . var_export($hm, true), 7);
         $this->log("Username entry lookup response: " . var_export($hm, true));
         return $hm;
     } catch (LdapException $exc) {
         return $exc->getMessage();
     }
 }
开发者ID:hlich,项目名称:zfcuser-ldap,代码行数:14,代码来源:Ldap.php

示例5: fromLdap

 /**
  * Factory method to create an attached Zend\Ldap\Node for a given DN.
  *
  * @param  string|array|Dn $dn
  * @param  Ldap            $ldap
  * @return Node|null
  * @throws Exception\LdapException
  */
 public static function fromLdap($dn, Ldap $ldap)
 {
     if (is_string($dn) || is_array($dn)) {
         $dn = Dn::factory($dn);
     } elseif ($dn instanceof Dn) {
         $dn = clone $dn;
     } else {
         throw new Exception\LdapException(null, '$dn is of a wrong data type.');
     }
     $data = $ldap->getEntry($dn, ['*', '+'], true);
     if ($data === null) {
         return;
     }
     $entry = new static($dn, $data, true, $ldap);
     return $entry;
 }
开发者ID:GeeH,项目名称:zend-ldap,代码行数:24,代码来源:Node.php


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