feature #18492 [LDAP] Check whether an entry attribute exists (hiddewie)
This PR was merged into the 3.1-dev branch.
Discussion
----------
[LDAP] Check whether an entry attribute exists
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
Currently a method exists for getting the value of an attribute. It would make the Entry class more complete to be able to simply test if an attribute exists in the entry.
Commits
-------
56ef8a0
[LDAP] Check whether an entry attribute exists
This commit is contained in:
commit
90e577c608
@ -35,6 +35,18 @@ class Entry
|
||||
return $this->dn;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns whether an attribute exists.
|
||||
*
|
||||
* @param $name string The name of the attribute
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function hasAttribute($name)
|
||||
{
|
||||
return isset($this->attributes[$name]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a specific attribute's value.
|
||||
*
|
||||
|
Reference in New Issue
Block a user