HumHub Documentation (unofficial)

Encoder
in package

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

Table of Contents

Properties

$options  : array<string|int, mixed>
Additional options used during encoding
$versionWritten  : bool

Methods

decode()  : array<string|int, mixed>
Decodes the string $string into an array of Ldif items
encode()  : string
Encode $value into a Ldif representation
__construct()  : mixed
_decode()  : array<string|int, mixed>
Decodes the string $string into an array of Ldif items
_encode()  : string
Recursive driver which determines the type of value to be encoded and then dispatches to the appropriate method.
encodeAttribute()  : string
Encodes an attribute with $name and $value according to RFC2849
encodeAttributes()  : string
Encodes a collection of attributes according to RFC2849
encodeString()  : string
Encodes $string according to RFC2849
pushAttribute()  : mixed
Pushes a decoded attribute to the stack

Properties

$options

Additional options used during encoding

protected array<string|int, mixed> $options = ['sort' => true, 'version' => 1, 'wrap' => 78]

$versionWritten

protected bool $versionWritten = false

Methods

decode()

Decodes the string $string into an array of Ldif items

public static decode(string $string) : array<string|int, mixed>
Parameters
$string : string
Return values
array<string|int, mixed>

encode()

Encode $value into a Ldif representation

public static encode(mixed $value[, array<string|int, mixed> $options = [] ]) : string
Parameters
$value : mixed

The value to be encoded

$options : array<string|int, mixed> = []

Additional options used during encoding

Return values
string

The encoded value

__construct()

protected __construct([array<string|int, mixed> $options = [] ]) : mixed
Parameters
$options : array<string|int, mixed> = []

Additional options used during encoding

_decode()

Decodes the string $string into an array of Ldif items

protected _decode(string $string) : array<string|int, mixed>
Parameters
$string : string
Return values
array<string|int, mixed>

_encode()

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

protected _encode(mixed $value) : string
Parameters
$value : mixed

The value to be encoded

Return values
string

Encoded value

encodeAttribute()

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

protected encodeAttribute(string $name, array<string|int, mixed>|string $value) : string
Parameters
$name : string
$value : array<string|int, mixed>|string
Tags
link
http://www.faqs.org/rfcs/rfc2849.html
Return values
string

encodeAttributes()

Encodes a collection of attributes according to RFC2849

protected encodeAttributes(array<string|int, mixed> $attributes) : string
Parameters
$attributes : array<string|int, mixed>
Tags
link
http://www.faqs.org/rfcs/rfc2849.html
Return values
string

encodeString()

Encodes $string according to RFC2849

protected encodeString(scalar $string[, bool &$base64 = null ]) : string
Parameters
$string : scalar
$base64 : bool = null
Tags
link
http://www.faqs.org/rfcs/rfc2849.html
Return values
string

pushAttribute()

Pushes a decoded attribute to the stack

protected pushAttribute(array<string|int, mixed> $attribute, array<string|int, mixed> &$entry) : mixed
Parameters
$attribute : array<string|int, mixed>
$entry : array<string|int, mixed>

        
On this page

Search results