has() 공개 메소드

Check to see if a specific attribute exists. Optionally check if it exists with a specific value.
public has ( string $attribute, mixed $value = null ) : boolean
$attribute string
$value mixed
리턴 boolean
예제 #1
0
 /**
  * The DN attribute must be present to perform LDAP operations.
  *
  * @param LdapObject $ldapObject
  */
 protected function validateObject(LdapObject $ldapObject)
 {
     if (!$ldapObject->has('dn')) {
         throw new InvalidArgumentException('To persist/delete/move/restore a LDAP object it must have the DN attribute.');
     }
 }