本文整理汇总了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);
}