當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Zend_Ldap_Node::create方法代碼示例

本文整理匯總了PHP中Zend_Ldap_Node::create方法的典型用法代碼示例。如果您正苦於以下問題:PHP Zend_Ldap_Node::create方法的具體用法?PHP Zend_Ldap_Node::create怎麽用?PHP Zend_Ldap_Node::create使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Zend_Ldap_Node的用法示例。


在下文中一共展示了Zend_Ldap_Node::create方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: testGetChanges

 public function testGetChanges()
 {
     $node = $this->_createTestNode();
     $node->host = array('d');
     $node->empty = 'not Empty';
     unset($node->boolean);
     $changes = $node->getChanges();
     $this->assertEquals(array('add' => array('empty' => array('not Empty')), 'delete' => array('boolean' => array()), 'replace' => array('host' => array('d'))), $changes);
     $node = Zend_Ldap_Node::create('uid=test,dc=example,dc=org', array('account'));
     $node->host = 'host';
     unset($node->cn);
     unset($node['sn']);
     $node['givenName'] = 'givenName';
     $node->appendToAttribute('objectClass', 'domain');
     $this->assertEquals(array('uid' => array('test'), 'objectclass' => array('account', 'domain'), 'host' => array('host'), 'givenname' => array('givenName')), $node->getChangedData());
     $this->assertEquals(array('add' => array('uid' => array('test'), 'objectclass' => array('account', 'domain'), 'host' => array('host'), 'givenname' => array('givenName')), 'delete' => array(), 'replace' => array()), $node->getChanges());
 }
開發者ID:netvlies,項目名稱:zf,代碼行數:17,代碼來源:OfflineTest.php

示例2: testMoveDeletedNewNode

 public function testMoveDeletedNewNode()
 {
     $dnOld = $this->_createDn('ou=Test,');
     $dnNew = $this->_createDn('ou=TestNew,');
     $node1 = Zend_Ldap_Node::create($dnOld, array('organizationalUnit'));
     $node1->setDn($dnNew);
     $node1->delete();
     $node1->update($this->_getLdap());
     $this->assertFalse($this->_getLdap()->exists($dnOld));
     $this->assertFalse($this->_getLdap()->exists($dnNew));
 }
開發者ID:crodriguezn,項目名稱:crossfit-milagro,代碼行數:11,代碼來源:UpdateTest.php


注:本文中的Zend_Ldap_Node::create方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。