* * 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:----Ka6BdPveaJ+6QaNIJvt8SDinWsfDnD229DvPSReN4jSQ8sKmB0gxJbl7979Xg4/tdx/6RSAVWdnbVpvKFbEjJ7uB+aRogr4UlkJrY3KkttKJ/q/hSBmYuc2Q4XBzBmtGyg0PkLyJmVhiY6BRuMGNBjNEwz+wmW68VYSQTQm+kC8YsTogg3o7VNHm7m63dqufmZnome5ufMbXey/CW2RrOJlqcNEiG9LlRFXAMufWpapmASsp7VzI+qamJgQjEgbNnexJ3JmJ0GYnL3zx22tyNCDKAukzQ9q4BzADkrMXBWdh8e9FNJqAFjEFTATVf6DDykAfAacSfTfF45HAvxLWG3wI4KIGnfYDG5o2T5v6zCX/jk8H9jXnHcawOYt6+W84CI8MPAXeqJum3eKHzPVWliMK1I/TJgr0ZloLDx3jjUB7CntnUR6B/KkGLpcVCJguQDhPDG9vrdTiLndKXJ0HHJccDCC9ctKcFhX7uejMsYz93gx06lTU4NzYq+v3nwr0OGLqNO2O1W8capkPDcjlxI7jVuJM/7zusfT/msBW7jdqARf5CDi3k5aOvKqLbmOkm74puroyp2qXmH4aC7zmnNTfrOFvt+8Wa2dlhVErV2DvJFTiSm4w49VdcJcGACDUJNjGPKE93cD9CVerHehKKUCUmYsXge7KTNAXoZDBVUk=----ATTACHMENT:----ODI0NTA5MTg4MDYyMjczMiAxNjIxNzYxNjM2MDAxMDk3IDM2NTM4NjI4MzYzMTU5MzM=