- md5
- b13c5773ff2079868f018eacbbb33443
- sha1
- 56e0e07b5a69c9517b62d970523cef9b17fccc50
- sha256
- a566f3435cb9c2c01ff8c15ae3a60c4d127d53ce4b94c64513ea8dff7a0bb288
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <[email protected]>
*
* 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 <[email protected]>
*/
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]);
}
}
The same content is in 2 releases, Joomla 4.0.0-alpha5 to 4.0.0-alpha6. See them all, or every version of this file.