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

category Zend
package Zend_Ldap
subpackage Ldif

 Methods

Decodes the string $string into an array of Ldif items

decode(string $string) : array

Parameters

$string

string

Returns

array

Encode $value into a Ldif representation

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

Parameters

$value

mixed

The value to be encoded

$options

array

Additional options used during encoding

Returns

stringThe encoded value

Constructor.

__construct(array $options) 

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, bool $base64) : string

link http://www.faqs.org/rfcs/rfc2849.html

Parameters

$string

string

$base64

bool

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

 

$versionWritten

$versionWritten : bool