本文整理匯總了PHP中Zend_Ldap_Node::fromLdap方法的典型用法代碼示例。如果您正苦於以下問題:PHP Zend_Ldap_Node::fromLdap方法的具體用法?PHP Zend_Ldap_Node::fromLdap怎麽用?PHP Zend_Ldap_Node::fromLdap使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Zend_Ldap_Node
的用法示例。
在下文中一共展示了Zend_Ldap_Node::fromLdap方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: getNode
/**
* Returns the specified DN as a Zend_Ldap_Node
*
* @param string|Zend_Ldap_Dn $dn
* @return Zend_Ldap_Node|null
* @throws Zend_Ldap_Exception
*/
public function getNode($dn)
{
/**
* Zend_Ldap_Node
*/
#require_once 'Zend/Ldap/Node.php';
return Zend_Ldap_Node::fromLdap($dn, $this);
}
示例2: testLoadFromLdapWithDnObject
public function testLoadFromLdapWithDnObject()
{
$dn = Zend_Ldap_Dn::fromString($this->_createDn('ou=Test1,'));
$node = Zend_Ldap_Node::fromLdap($dn, $this->_getLdap());
$this->assertType('Zend_Ldap_Node', $node);
$this->assertTrue($node->isAttached());
}
示例3: getNode
/**
* Returns the specified DN as a Zend_Ldap_Node
*
* @param string|Zend_Ldap_Dn $dn
* @return Zend_Ldap_Node|null
* @throws Zend_Ldap_Exception
*/
public function getNode($dn)
{
/**
* Zend_Ldap_Node
*/
require_once PHP_LIBRARY_PATH . 'Zend/Ldap/Node.php';
return Zend_Ldap_Node::fromLdap($dn, $this);
}
示例4: testMoveNode
public function testMoveNode()
{
$dnOld = $this->_createDn('ou=Test1,');
$dnNew = $this->_createDn('ou=Test,');
$node = Zend_Ldap_Node::fromLdap($dnOld, $this->_getLdap());
$node->setDn($dnNew);
$node->update();
$this->assertFalse($this->_getLdap()->exists($dnOld));
$this->assertTrue($this->_getLdap()->exists($dnNew));
$node = Zend_Ldap_Node::fromLdap($dnNew, $this->_getLdap());
$node->move($dnOld);
$node->update();
$this->assertFalse($this->_getLdap()->exists($dnNew));
$this->assertTrue($this->_getLdap()->exists($dnOld));
$node = Zend_Ldap_Node::fromLdap($dnOld, $this->_getLdap());
$node->rename($dnNew);
$node->update();
$this->assertFalse($this->_getLdap()->exists($dnOld));
$this->assertTrue($this->_getLdap()->exists($dnNew));
}
示例5: getNode
/**
* Returns the specified DN as a Zend_Ldap_Node
*
* @param string|Zend_Ldap_Dn $dn
* @return Zend_Ldap_Node|null
* @throws Zend_Ldap_Exception
*/
public function getNode($dn)
{
/**
* Zend_Ldap_Node
*/
return Zend_Ldap_Node::fromLdap($dn, $this);
}