ZendLdapConverter is a collection of useful LDAP related conversion functions.
Converts all ASCII chars < 32 to “HEX”
Parameters: | string – String to convert |
---|---|
Return type: | string |
Converts all Hex expressions (“HEX”) to their original ASCII characters
Parameters: | string – String to convert |
---|---|
Return type: | string |
Convert any value to an LDAP-compatible value.
By setting the <var>$type</var>-parameter the conversion of a certain type can be forced
Parameters: |
|
---|---|
Return type: | string|null |
Throws : | ExceptionConverterException |
Converts a date-entity to an LDAP-compatible date-string
The date-entity <var>$date</var> can be either a timestamp, a DateTime Object, a string that is parseable by strtotime().
Parameters: |
|
---|---|
Return type: | string |
Throws : | ExceptionInvalidArgumentException |
Convert 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’.
Parameters: | bool|integer|string – The boolean value to encode |
---|---|
Return type: | string |
Serialize any value for storage in LDAP
Parameters: | mixed – The value to serialize |
---|---|
Return type: | string |
Convert an LDAP-compatible value to a corresponding PHP-value.
By setting the <var>$type</var>-parameter the conversion of a certain type can be forced.
Parameters: |
|
---|---|
Return type: | mixed |
Convert an LDAP-Generalized-Time-entry into a DateTime-Object
CAVEAT: The DateTime-Object returned will always be set to UTC-Timezone.
Parameters: |
|
---|---|
Return type: | DateTime |
Throws : | ExceptionInvalidArgumentException if a non-parseable-format is given |