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 |
string
String to convert
string
fromLdap(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 |
string
The value to convert
int
The conversion type to use
bool
Return DateTime values in UTC timezone
mixed
fromLdapBoolean(string $value) : bool
string
The value to convert
\Zend\Ldap\Converter\Exception\InvalidArgumentException |
---|
bool
fromLdapDateTime(string $date, bool $asUtc) : \DateTime
CAVEAT: The DateTime-Object returned will always be set to UTC-Timezone.
string
The generalized-Time
bool
Return the DateTime with UTC timezone
\Zend\Ldap\Converter\Exception\InvalidArgumentException |
if a non-parseable-format is given |
---|
fromLdapUnserialize(string $value) : mixed
string
The value to convert
\Zend\Ldap\Converter\Exception\UnexpectedValueException |
---|
mixed
hex32ToAsc(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 |
string
String to convert
string
toLdap(mixed $value, int $type) : string | null
By setting the $type-parameter the conversion of a certain type can be forced
mixed
The value to convert
int
The conversion type to use
\Zend\Ldap\Converter\Exception\ConverterException |
---|
string
null
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'.
boolintstring
The boolean value to encode
string
toLdapDateTime(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().
bool
Whether to return the LDAP-compatible date-string as UTC or as local value
\Zend\Ldap\Converter\Exception\InvalidArgumentException |
---|
string
toLdapSerialize(mixed $value) : string
mixed
The value to serialize
string
BOOLEAN
GENERALIZED_TIME
STANDARD