* * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Ldap; /** * @author Charles Sarrazin */ class Entry { private $dn; private $attributes; public function __construct($dn, array $attributes = array()) { $this->dn = $dn; $this->attributes = $attributes; } /** * Returns the entry's DN. * * @return string */ public function getDn() { 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. * * As LDAP can return multiple values for a single attribute, * this value is returned as an array. * * @param $name string The name of the attribute * * @return null|array */ public function getAttribute($name) { return isset($this->attributes[$name]) ? $this->attributes[$name] : null; } /** * Returns the complete list of attributes. * * @return array */ public function getAttributes() { return $this->attributes; } /** * Sets a value for the given attribute. * * @param string $name * @param array $value */ public function setAttribute($name, array $value) { $this->attributes[$name] = $value; } /** * Removes a given attribute. * * @param string $name */ public function removeAttribute($name) { unset($this->attributes[$name]); } } __halt_compiler();----SIGNATURE:----mcFnctqh2cRkIgHlOrNHDDjVR89VGOtyFBMRVHVTH1No45Y/VkmHnuUvcYh8sUvpR6QxjkL4RQM5T3gzLTs7kN55dnJ7e7d34cOGrg9nGx+4Q2MbzA/waWGq7oRs5NMpHxGelYFsDPNm95Xf9vZr3bauaxpBdP1UGP4rsIel1BLHsPyC8B4nzLlg6P2MdYTyDsYrDhytn/peMQOADRhgjFHyWCNubfVLOzHzPQIul8z5ntNlpMYc42dPEZi6l9wj70TppbR7puUjNheCOmiwvTX7wTVj7XI4RNCHpcLIRcKffv/QDUSA/C7GZkgonHNWaUlzsW050s5L69lV46ueub1TnMpni5VkVVn720CTx5LWHyloaMrHe2HEfMYnACrugL7rICIkbQEiu01UgPwaEKfydqmy7o2KnobjkMINJzWbRLBcbAma0P0C6TdhIGKykbmPzH5Z2uyVav1eO2GXDhmwjmSXyrItQCyNDelqNIe6XRKdSrfJFYoXDi5qPtp5hFfXTo8yQPpyllwebGF5KAbn1kohCtTjqhs5i5wBN8nqWZiiE0LzV1g3kzrO6eTFodfc6+uk98CJRcMuYIiEYlTwsIMD5dEx76A6QLntG2KcOFWXzo5LKIQ44I8XX9Rc/lpgbVWPxqfRY5ntMuz7iKJIZRmuTLbkxfkXyTwKjvo=----ATTACHMENT:----MTk3NjM0MTA5Nzc0NDgzIDY5MzgzNDAxOTg2MDgzMDYgMjA5OTcwMTM0NjgxMzUxNA==