Example #1
0
 /**
  * Modify an entry. 
  *
  * Note: Will do a complete update of all fields and can be quite slow
  * TBD(?): Be more intelligent about what to update?
  *
  * @param   peer.ldap.LDAPEntry entry
  * @return  bool success
  * @throws  lang.IllegalArgumentException when entry parameter is not an LDAPEntry object
  * @throws  peer.ldap.LDAPException when an error occurs during adding the entry
  */
 public function modify(LDAPEntry $entry)
 {
     if (false == ($res = ldap_modify($this->_hdl, $entry->getDN(), $entry->getAttributes()))) {
         throw new LDAPException('Modify for "' . $entry->getDN() . '" failed', ldap_errno($this->_hdl));
     }
     return $res;
 }
 /**
  * Modify an entry. 
  *
  * Note: Will do a complete update of all fields and can be quite slow
  * TBD(?): Be more intelligent about what to update?
  *
  * @param   peer.ldap.LDAPEntry entry
  * @return  bool success
  * @throws  lang.IllegalArgumentException when entry parameter is not an LDAPEntry object
  * @throws  peer.ldap.LDAPException when an error occurs during adding the entry
  */
 public function modify(LDAPEntry $entry)
 {
     if (false == ($res = ldap_modify($this->handle, $entry->getDN(), $entry->getAttributes()))) {
         throw $this->error('Modify for "' . $entry->getDN() . '" failed');
     }
     return $res;
 }