diff --git a/src/Symfony/Component/Ldap/Entry.php b/src/Symfony/Component/Ldap/Entry.php index 17551a4f7a..42745c2b89 100644 --- a/src/Symfony/Component/Ldap/Entry.php +++ b/src/Symfony/Component/Ldap/Entry.php @@ -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. *