示例#1
0
文件: Node.php 项目: GeeH/zend-ldap
 /**
  * Remove given values from a LDAP attribute
  *
  * @param  string      $attribName
  * @param  mixed|array $value
  * @return void
  */
 public function removeFromAttribute($attribName, $value)
 {
     Attribute::removeFromAttribute($this->currentData, $attribName, $value);
 }
示例#2
0
 public function testRemoveAttributeValueInteger()
 {
     $data = array('test' => array('1', '2', '3', '4'));
     Attribute::removeFromAttribute($data, 'test', array(2, 4));
     $this->assertArrayHasKey('test', $data);
     $this->assertInternalType('array', $data['test']);
     $this->assertEquals(2, count($data['test']));
     $this->assertContains('1', $data['test']);
     $this->assertContains('3', $data['test']);
     $this->assertNotContains('2', $data['test']);
     $this->assertNotContains('4', $data['test']);
 }