Ldap/Ldif/Encoder.php
Zend Framework
LICENSE
This source file is subject to the new BSD license that is bundled with this package in the file LICENSE.txt. It is also available through the world-wide-web at this URL: http://framework.zend.com/license/new-bsd If you did not receive a copy of the license and are unable to obtain it through the world-wide-web, please send an email to [email protected] so we can send you a copy immediately.
- Category
- Zend
- Copyright
- Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
- Package
- Zend_Ldap
- Subpackage
- Ldif
- Version
- $Id: Encoder.php 24593 2012-01-05 20:35:02Z matthew $
\Zend_Ldap_Ldif_Encoder
Zend_Ldap_Ldif_Encoder provides methods to encode and decode LDAP data into/from LDIF.
- Category
- Zend
- Copyright
- Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
Properties


array $_options = array('sort' => true, 'version' => 1, 'wrap' => 78)
Additional options used during encoding
array('sort' => true, 'version' => 1, 'wrap' => 78)
Details- Type
- array
Methods


__construct(array $options = array()) : void
Constructor.
Name | Type | Description |
---|---|---|
$options | array | Additional options used during encoding |


_decode(string $string) : array
Decodes the string $string into an array of LDIF items
Name | Type | Description |
---|---|---|
$string | string |
Type | Description |
---|---|
array |


_encode(mixed $value) : string
Recursive driver which determines the type of value to be encoded and then dispatches to the appropriate method.
Name | Type | Description |
---|---|---|
$value | mixed | The value to be encoded |
Type | Description |
---|---|
string | Encoded value |


_encodeAttribute(string $name, array | string $value) : string
Encodes an attribute with $name and $value according to RFC2849
Name | Type | Description |
---|---|---|
$name | string | |
$value | array | string |
Type | Description |
---|---|
string |


_encodeAttributes(array $attributes) : string
Encodes a collection of attributes according to RFC2849
Name | Type | Description |
---|---|---|
$attributes | array |
Type | Description |
---|---|
string |


_encodeString(string $string, \boolen $base64 = null) : string
Encodes $string according to RFC2849
Name | Type | Description |
---|---|---|
$string | string | |
$base64 | \boolen |
Type | Description |
---|---|
string |


_pushAttribute(array $attribute, array $entry) : void
Pushes a decoded attribute to the stack
Name | Type | Description |
---|---|---|
$attribute | array | |
$entry | array |


decode(string $string) : array
Decodes the string $string into an array of LDIF items
Name | Type | Description |
---|---|---|
$string | string |
Type | Description |
---|---|
array |