Zend Framework
LICENSE
This source file is subject to the new BSD license that is bundled with this package in the file LICENSE.txt. It is also available through the world-wide-web at this URL: http://framework.zend.com/license/new-bsd If you did not receive a copy of the license and are unable to obtain it through the world-wide-web, please send an email to license@zend.com so we can send you a copy immediately.
Zend_Ldap_Converter is a collection of useful LDAP related conversion functions.
STANDARD = '0'
Details BOOLEAN = '1'
Details GENERALIZED_TIME = '2'
DetailsascToHex32(
string $string
)
:
stringConverts all ASCII chars < 32 to "\HEX"
DetailsfromLdap(
string $value, $type
=
self, boolean $dateTimeAsUtc
=
true
)
:
mixedConvert an LDAP-compatible value to a corresponding PHP-value.
By setting the $type-parameter the conversion of a certain type can be forced .
DetailsfromLdapBoolean(
string $value
)
:
booleanConvert an LDAP-compatible boolean value into a PHP-compatible one
DetailsfromLdapDateTime(
string $date, boolean $asUtc
=
true
)
:
DateTimeConvert an LDAP-Generalized-Time-entry into a DateTime-Object
CAVEAT: The DateTime-Object returned will alwasy be set to UTC-Timezone.
DetailsfromLdapUnserialize(
string $value
)
:
mixedUnserialize a serialized value to return the corresponding object
Detailshex32ToAsc(
string $string
)
:
stringConverts all Hex expressions ("\HEX") to their original ASCII characters
DetailstoLdap(
mixed $value, $type
=
self
)
:
stringConvert any value to an LDAP-compatible value.
By setting the $type-parameter the conversion of a certain type can be forced
DetailstoLdapBoolean(
boolean|integer|string $value
)
:
stringConvert a boolean value to an LDAP-compatible 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'.
DetailstoLdapDateTime(
integer|string|DateTimt|Zend_Date $date, boolean $asUtc
=
true
)
:
stringConverts a date-entity to an LDAP-compatible date-string
The date-entity $date can be either a timestamp, a DateTime Object, a string that is parseable by strtotime() or a Zend_Date Object.
DetailstoLdapSerialize(
mixed $value
)
:
stringSerialize any value for storage in LDAP
Details