ascToHex32()
fromLdap()
fromLdapBoolean()
fromLdapDateTime()
fromLdapUnserialize()
hex32ToAsc()
toLdap()
toLdapBoolean()
toLdapDateTime()
toLdapSerialize()
BOOLEAN
GENERALIZED_TIME
STANDARD
Zend\Ldap\Converter is a collection of useful LDAP related conversion functions.
ascToHex32(string $string) : string
| see | \Zend\Ldap\Converter\Net_LDAP2_Util::asc2hex32() |
|---|---|
| link | http://pear.php.net/package/Net_LDAP2 |
| author | Benedikt Hallinger |
stringString to convert
stringfromLdap(string $value, int $type, bool $dateTimeAsUtc) : mixed
By setting the $type-parameter the conversion of a certain type can be forced.
| see | \Zend\Ldap\Converter\Converter::STANDARD |
|---|---|
| see | \Zend\Ldap\Converter\Converter::BOOLEAN |
| see | \Zend\Ldap\Converter\Converter::GENERALIZED_TIME |
stringThe value to convert
intThe conversion type to use
boolReturn DateTime values in UTC timezone
mixedfromLdapBoolean(string $value) : bool
stringThe value to convert
\Zend\Ldap\Converter\Exception\InvalidArgumentException |
|---|
boolfromLdapDateTime(string $date, bool $asUtc) : \DateTime
CAVEAT: The DateTime-Object returned will always be set to UTC-Timezone.
stringThe generalized-Time
boolReturn the DateTime with UTC timezone
\Zend\Ldap\Converter\Exception\InvalidArgumentException |
if a non-parseable-format is given |
|---|
fromLdapUnserialize(string $value) : mixed
stringThe value to convert
\Zend\Ldap\Converter\Exception\UnexpectedValueException |
|---|
mixedhex32ToAsc(string $string) : string
| see | \Zend\Ldap\Converter\Net_LDAP2_Util::hex2asc() |
|---|---|
| link | http://pear.php.net/package/Net_LDAP2 |
| author | Benedikt Hallinger <beni@php.net>, heavily based on work from DavidSmith@byu.net |
stringString to convert
stringtoLdap(mixed $value, int $type) : string | null
By setting the $type-parameter the conversion of a certain type can be forced
mixedThe value to convert
intThe conversion type to use
\Zend\Ldap\Converter\Exception\ConverterException |
|---|
stringnull
toLdapBoolean(bool | int | string $value) : string
This converts a boolean value of TRUE, an integer-value of 1 and a case-insensitive string 'true' to an LDAP-compatible 'TRUE'. All other other values are converted to an LDAP-compatible 'FALSE'.
boolintstringThe boolean value to encode
stringtoLdapDateTime(int | string | \DateTime $date, bool $asUtc) : string
The date-entity $date can be either a timestamp, a DateTime Object, a string that is parseable by strtotime().
boolWhether to return the LDAP-compatible date-string as UTC or as local value
\Zend\Ldap\Converter\Exception\InvalidArgumentException |
|---|
stringtoLdapSerialize(mixed $value) : string
mixedThe value to serialize
stringBOOLEAN
GENERALIZED_TIME
STANDARD