This class provides a base implementation for LDAP nodes

 Methods

Gets a LDAP attribute.

__get(string $name) : mixed

This is an offline method.

Parameters

$name

string

Exceptions

\Zend\Ldap\Exception\LdapException

Returns

mixed

Checks whether a given attribute exists.

__isset(string $name) : bool

Empty attributes will be treated as non-existent.

Parameters

$name

string

Returns

bool

Sets a LDAP attribute.

__set(string $name, mixed $value) 

This is an offline method.

Parameters

$name

string

$value

mixed

Exceptions

\Zend\Ldap\Exception\BadMethodCallException

Cast to string representation {@see toString()}

__toString() : string

Returns

string

Deletes a LDAP attribute.

__unset($name) 

This method deletes the attribute.

This is an offline method.

Parameters

$name

Exceptions

\Zend\Ldap\Exception\BadMethodCallException

Checks if the given value(s) exist in the attribute

attributeHasValue(string $attribName, mixed | array $value) : bool

Parameters

$attribName

string

$value

mixedarray

Returns

bool

Returns the number of attributes in node.

count() : int

Implements Countable

Returns

int

Checks whether a given attribute exists.

existsAttribute(string $name, bool $emptyExists) : bool

If $emptyExists is false empty attributes (containing only array()) are treated as non-existent returning false. If $emptyExists is true empty attributes are treated as existent returning true. In this case method returns false only if the attribute name is missing in the key-collection.

Parameters

$name

string

$emptyExists

bool

Returns

bool

Gets a LDAP attribute.

getAttribute(string $name, integer $index) : mixed

This is an offline method.

Parameters

$name

string

$index

integer

Exceptions

\Zend\Ldap\Exception\LdapException

Returns

mixed

Gets all attributes of node.

getAttributes(bool $includeSystemAttributes) : array

The collection contains all attributes.

This is an offline method.

Parameters

$includeSystemAttributes

bool

Returns

array

Gets node attributes.

getData(bool $includeSystemAttributes) : array

The array contains all attributes in its internal format (no conversion).

This is an offline method.

Parameters

$includeSystemAttributes

bool

Returns

array

Gets a LDAP date/time attribute.

getDateTimeAttribute(string $name, integer $index) : array | integer

This is an offline method.

Parameters

$name

string

$index

integer

Exceptions

\Zend\Ldap\Exception\LdapException

Returns

arrayinteger

Gets the DN of the current node as a Zend\Ldap\Dn.

getDn() : \Zend\Ldap\Dn

The method returns a clone of the node's DN to prohibit modification.

This is an offline method.

Returns

Gets the DN of the current node as an array.

getDnArray(string $caseFold) : array

This is an offline method.

Parameters

$caseFold

string

Returns

array

Gets the DN of the current node as a string.

getDnString(string $caseFold) : string

This is an offline method.

Parameters

$caseFold

string

Returns

string

Gets the objectClass of the node

getObjectClass() : array

Returns

array

Gets the RDN of the current node as an array.

getRdnArray(string $caseFold) : array

This is an offline method.

Parameters

$caseFold

string

Returns

array

Gets the RDN of the current node as a string.

getRdnString(string $caseFold) : string

This is an offline method.

Parameters

$caseFold

string

Returns

string

Checks whether a given attribute exists.

offsetExists(string $name) : bool

Implements ArrayAccess.

Empty attributes will be treated as non-existent.

Parameters

$name

string

Returns

bool

Gets a LDAP attribute.

offsetGet(string $name) : mixed

Implements ArrayAccess.

This is an offline method.

Parameters

$name

string

Exceptions

\Zend\Ldap\Exception\LdapException

Returns

mixed

Sets a LDAP attribute.

offsetSet(string $name, mixed $value) 

Implements ArrayAccess.

This is an offline method.

Parameters

$name

string

$value

mixed

Exceptions

\Zend\Ldap\Exception\BadMethodCallException
\Zend\Ldap\Exception\BadMethodCallException

Deletes a LDAP attribute.

offsetUnset($name) 

Implements ArrayAccess.

This method deletes the attribute.

This is an offline method.

Parameters

$name

Exceptions

\Zend\Ldap\Exception\BadMethodCallException

Reload node attributes from LDAP.

reload(\Zend\Ldap\Ldap $ldap) : \Zend\Ldap\Node\AbstractNode

This is an online method.

Parameters

Returns

\Zend\Ldap\Node\AbstractNodeProvides a fluid interface

Returns an array representation of the current node

toArray(bool $includeSystemAttributes) : array

Parameters

$includeSystemAttributes

bool

Returns

array

Returns a JSON representation of the current node

toJson(bool $includeSystemAttributes) : string

Parameters

$includeSystemAttributes

bool

Returns

string

Returns the DN of the current node.

toString() : string

{@see getDnString()}

Returns

string

Constructor.

__construct(\Zend\Ldap\Dn $dn, array $data, bool $fromDataSource) 

Constructor is protected to enforce the use of factory methods.

Parameters

$data

array

$fromDataSource

bool

Gets the DN of the current node as a Zend\Ldap\Dn.

_getDn() : \Zend\Ldap\Dn

This is an offline method.

Returns

loadData()

loadData(array $data, bool $fromDataSource) 

Parameters

$data

array

$fromDataSource

bool

 Properties

 

Holds the node's current data.

$currentData : array

 

Holds the node's DN.

$dn : \Zend\Ldap\Dn

 

$systemAttributes

$systemAttributes