Zend_Ldap_Ldif_Encoder provides methods to encode and decode LDAP data into/from LDIF.

category Zend
package Zend_Ldap
subpackage Ldif
copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
license New BSD License

 Methods

Decodes the string $string into an array of LDIF items

decode(string $string) : array
Static

Parameters

$string

string

Returns

array

Encode $value into a LDIF representation

encode(mixed $value, array $options = array()) : string
Static

Parameters

$value

mixed

The value to be encoded

$options

array

Additional options used during encoding

Returns

stringThe encoded value

Constructor.

__construct(array $options = array()) : void

Parameters

$options

array

Additional options used during encoding

Decodes the string $string into an array of LDIF items

_decode(string $string) : array

Parameters

$string

string

Returns

array

Recursive driver which determines the type of value to be encoded and then dispatches to the appropriate method.

_encode(mixed $value) : string

Parameters

$value

mixed

The value to be encoded

Returns

stringEncoded value

Encodes an attribute with $name and $value according to RFC2849

_encodeAttribute(string $name, array|string $value) : string
link http://www.faqs.org/rfcs/rfc2849.html

Parameters

$name

string

$value

arraystring

Returns

string

Encodes a collection of attributes according to RFC2849

_encodeAttributes(array $attributes) : string
link http://www.faqs.org/rfcs/rfc2849.html

Parameters

$attributes

array

Returns

string

Encodes $string according to RFC2849

_encodeString(string $string, \boolen $base64 = null) : string
link http://www.faqs.org/rfcs/rfc2849.html

Parameters

$string

string

$base64

\boolen

Returns

string

Pushes a decoded attribute to the stack

_pushAttribute(array $attribute, array $entry) 

Parameters

$attribute

array

$entry

array

 Properties

 

Additional options used during encoding

$_options : array

Default

array('sort' => true, 'version' => 1, 'wrap' => 78)
 

$_versionWritten

$_versionWritten : boolean

Default

false