Zend\Ldap\Attribute is a collection of LDAP attribute related functions.

package Default

 Methods

Checks if the given value(s) exist in the attribute

attributeHasValue(array $data, string $attribName, mixed|array $value) : boolean
Static

Parameters

$data

array

$attribName

string

$value

mixedarray

Returns

boolean

Creates a LDAP password.

createPassword(string $password, string $hashType = self::PASSWORD_HASH_MD5) : string
Static

Parameters

$password

string

$hashType

string

Returns

string

Gets a LDAP attribute.

getAttribute(array $data, string $attribName, integer $index = null) : array | mixed
Static

Parameters

$data

array

$attribName

string

$index

integer

Returns

arraymixed

Gets a LDAP date/time attribute.

getDateTimeAttribute(array $data, string $attribName, integer $index = null) : array | integer
Static

Parameters

$data

array

$attribName

string

$index

integer

Returns

arrayinteger

Removes duplicate values from a LDAP attribute

removeDuplicatesFromAttribute(array $data, string $attribName) : void
Static

Parameters

$data

array

$attribName

string

Remove given values from a LDAP attribute

removeFromAttribute(array $data, string $attribName, mixed|array $value) : void
Static

Parameters

$data

array

$attribName

string

$value

mixedarray

Sets a LDAP attribute.

setAttribute(array $data, string $attribName, string|array|\Traversable $value, boolean $append = false) : void
Static

Parameters

$data

array

$attribName

string

$value

stringarray\Traversable

$append

boolean

Sets a LDAP date/time attribute.

setDateTimeAttribute(array $data, string $attribName, integer|array|\Traversable $value, boolean $utc = false, boolean $append = false
Static

Parameters

$data

array

$attribName

string

$value

integerarray\Traversable

$utc

boolean

$append

boolean

Sets a LDAP password.

setPassword(array $data, string $password, string $hashType = self::PASSWORD_HASH_MD5, string $attribName = null
Static

Parameters

$data

array

$password

string

$hashType

string

Optional by default MD5

$attribName

string

Optional

valueFromLdap()

valueFromLdap(string $value) : mixed
Static

Parameters

$value

string

Returns

mixed

valueFromLdapDateTime()

valueFromLdapDateTime(string|\DateTime $value) : integer | null
Static

Parameters

$value

string\DateTime

Returns

integernull

valueToLdap()

valueToLdap(mixed $value) : string | null
Static

Parameters

$value

mixed

Returns

stringnull

valueToLdapDateTime()

valueToLdapDateTime(integer $value, boolean $utc) : string | null
Static

Parameters

$value

integer

$utc

boolean

Returns

stringnull

 Constants

 

PASSWORD_HASH_MD5

PASSWORD_HASH_MD5 = 'md5' 
 

PASSWORD_HASH_SHA

PASSWORD_HASH_SHA = 'sha' 
 

PASSWORD_HASH_SMD5

PASSWORD_HASH_SMD5 = 'smd5' 
 

PASSWORD_HASH_SSHA

PASSWORD_HASH_SSHA = 'ssha' 
 

PASSWORD_UNICODEPWD

PASSWORD_UNICODEPWD = 'unicodePwd'