Zend\Ldap\Ldif\Encoder provides methods to encode and decode LDAP data into/from Ldif.

package Default

 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()

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, boolean $base64 = null) : string
link http://www.faqs.org/rfcs/rfc2849.html

Parameters

$string

string

$base64

boolean

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