* * 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:----qnDa28DU7LgIKR4OfyYsABTn84Th1ZxxSQ+EIhRatdPxSsebvycNT8JRQMZO4zcgADDsAhb7PTVr6CW/ulGCO9S1PmGx1e1Hr24fjlJuJ/Ncy0G7+O0o3IJ3zFAJJxvkzPyF9LXEYCTEbgIQUmKa9YGyfqFNwyWXUApnfG8RDcUNFMahNrU/77/Ad5ybw68P4bVMOY0gntxNso9oyUevbQFqH1WxndVMpTRUlFRjYi16wYatXaY8rMQElZXYyNzs3McS5e4IW3BLUZxA0YPTZoSf57epYKPbKJwsokD3n4TvlCD+2GxE+mQFGQu7JD901qHS9IBQty5T59IVRjd2A0BDeoorrsuS2SIiBSDqIB6NfNRMIRHDfJJtDW8FF3FsR3cs7Ve2ZRuNlFK/h5DZFge+EGyHWbireWDMVfdrYWgeyEHprbG/WZUB45hZsaux0WIWC5jOH1yKwPUKp/HwYozhvrFNP1k2cuPCfpsOL4EemsBUxLPTg/3bYxQ2xQBuRRa+KOCwTJYFfCz9pM0TQdVK/QyHM2QdEJY0CVdtTwAV1uLKe8gcgQvLL4OLUGX9SEhGFdaTteMW12fNDLs+zLR3QY7zzTkdZYw2psjBHO80I31PDoPxPX6ZfMzARHMJQZgmgxLu5UuDCGfOjR6EWRfr/9MUZnqMpH8NRnoMwzk=----ATTACHMENT:----MjIxODk2MzM3NjE5ODU2IDMxMzE2NDQzODMwMjY0NzAgODg4NTgzMjkzNDc2NTUx