Ldap/Node/Abstract.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
- Node
- Version
- $Id: Abstract.php 24593 2012-01-05 20:35:02Z matthew $
\Zend_Ldap_Node_Abstract
Zend_Ldap_Node_Abstract provides a bas eimplementation for LDAP nodes
- Implements
- Children
- \Zend_Ldap_Node
- \Zend_Ldap_Node_RootDse
- \Zend_Ldap_Node_Schema
- Category
- Zend
- Copyright
- Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
Properties

$_systemAttributes = array('createtimestamp', 'creatorsname', 'entrycsn', 'entrydn', 'entryuuid', 'hassubordinates', 'modifiersname', 'modifytimestamp', 'structuralobjectclass', 'subschemasubentry', 'distinguishedname', 'instancetype', 'name', 'objectcategory', 'objectguid', 'usnchanged', 'usncreated', 'whenchanged', 'whencreated')array('createtimestamp', 'creatorsname', 'entrycsn', 'entrydn', 'entryuuid', 'hassubordinates', 'modifiersname', 'modifytimestamp', 'structuralobjectclass', 'subschemasubentry', 'distinguishedname', 'instancetype', 'name', 'objectcategory', 'objectguid', 'usnchanged', 'usncreated', 'whenchanged', 'whencreated')Details- Type
- n/a
Methods

__construct(\Zend_Ldap_Dn $dn, array $data, boolean $fromDataSource) : voidConstructor.
Constructor is protected to enforce the use of factory methods.
| Name | Type | Description |
|---|---|---|
| $dn | \Zend_Ldap_Dn | |
| $data | array | |
| $fromDataSource | boolean |

__get(string $name) : arrayGets a LDAP attribute.
This is an offline method.
| Name | Type | Description |
|---|---|---|
| $name | string |
| Type | Description |
|---|---|
| array |
| Exception | Description |
|---|---|
| \Zend_Ldap_Exception |

__isset(string $name) : booleanChecks whether a given attribute exists.
Empty attributes will be treated as non-existent.
| Name | Type | Description |
|---|---|---|
| $name | string |
| Type | Description |
|---|---|
| boolean |

__set(string $name, mixed $value) : nullSets a LDAP attribute.
This is an offline method.
| Name | Type | Description |
|---|---|---|
| $name | string | |
| $value | mixed |
| Type | Description |
|---|---|
| null |
| Exception | Description |
|---|---|
| \BadMethodCallException |

__toString() : stringCast to string representation {@see toString()}
| Type | Description |
|---|---|
| string |

__unset(string $name) : nullDeletes a LDAP attribute.
This method deletes the attribute.
This is an offline method.
| Name | Type | Description |
|---|---|---|
| $name | string |
| Type | Description |
|---|---|
| null |
| Exception | Description |
|---|---|
| \BadMethodCallException |

_getDn() : \Zend_Ldap_DnGets the DN of the current node as a Zend_Ldap_Dn.
This is an offline method.
| Type | Description |
|---|---|
| \Zend_Ldap_Dn |

_loadData(array $data, boolean $fromDataSource) : void| Name | Type | Description |
|---|---|---|
| $data | array | |
| $fromDataSource | boolean |
| Exception | Description |
|---|---|
| \Zend_Ldap_Exception |

attributeHasValue(string $attribName, mixed | array $value) : booleanChecks if the given value(s) exist in the attribute
| Name | Type | Description |
|---|---|---|
| $attribName | string | |
| $value | mixed | array |
| Type | Description |
|---|---|
| boolean |

count() : intReturns the number of attributes in node.
Implements Countable
| Type | Description |
|---|---|
| int |

existsAttribute(string $name, boolean $emptyExists = false) : booleanChecks whether a given attribute exists.
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.
| Name | Type | Description |
|---|---|---|
| $name | string | |
| $emptyExists | boolean |
| Type | Description |
|---|---|
| boolean |

getAttribute(string $name, integer $index = null) : mixedGets a LDAP attribute.
This is an offline method.
| Name | Type | Description |
|---|---|---|
| $name | string | |
| $index | integer |
| Type | Description |
|---|---|
| mixed |
| Exception | Description |
|---|---|
| \Zend_Ldap_Exception |

getAttributes(boolean $includeSystemAttributes = true) : arrayGets all attributes of node.
The collection contains all attributes.
This is an offline method.
| Name | Type | Description |
|---|---|---|
| $includeSystemAttributes | boolean |
| Type | Description |
|---|---|
| array |

getData(boolean $includeSystemAttributes = true) : arrayGets node attributes.
The array contains all attributes in its internal format (no conversion).
This is an offline method.
| Name | Type | Description |
|---|---|---|
| $includeSystemAttributes | boolean |
| Type | Description |
|---|---|
| array |

getDateTimeAttribute(string $name, integer $index = null) : array | integerGets a LDAP date/time attribute.
This is an offline method.
| Name | Type | Description |
|---|---|---|
| $name | string | |
| $index | integer |
| Type | Description |
|---|---|
| array | integer |
| Exception | Description |
|---|---|
| \Zend_Ldap_Exception |

getDn() : \Zend_Ldap_DnGets the DN of the current node as a Zend_Ldap_Dn.
The method returns a clone of the node's DN to prohibit modification.
This is an offline method.
| Type | Description |
|---|---|
| \Zend_Ldap_Dn |

getDnArray(string $caseFold = null) : arrayGets the DN of the current node as an array.
This is an offline method.
| Name | Type | Description |
|---|---|---|
| $caseFold | string |
| Type | Description |
|---|---|
| array |

getDnString(string $caseFold = null) : stringGets the DN of the current node as a string.
This is an offline method.
| Name | Type | Description |
|---|---|---|
| $caseFold | string |
| Type | Description |
|---|---|
| string |

getRdnArray(string $caseFold = null) : arrayGets the RDN of the current node as an array.
This is an offline method.
| Name | Type | Description |
|---|---|---|
| $caseFold | string |
| Type | Description |
|---|---|
| array |

getRdnString(string $caseFold = null) : stringGets the RDN of the current node as a string.
This is an offline method.
| Name | Type | Description |
|---|---|---|
| $caseFold | string |
| Type | Description |
|---|---|
| string |

offsetExists(string $name) : booleanChecks whether a given attribute exists.
Implements ArrayAccess.
Empty attributes will be treated as non-existent.
| Name | Type | Description |
|---|---|---|
| $name | string |
| Type | Description |
|---|---|
| boolean |

offsetGet(string $name) : arrayGets a LDAP attribute.
Implements ArrayAccess.
This is an offline method.
| Name | Type | Description |
|---|---|---|
| $name | string |
| Type | Description |
|---|---|
| array |
| Exception | Description |
|---|---|
| \Zend_Ldap_Exception |

offsetSet(string $name, mixed $value) : nullSets a LDAP attribute.
Implements ArrayAccess.
This is an offline method.
| Name | Type | Description |
|---|---|---|
| $name | string | |
| $value | mixed |
| Type | Description |
|---|---|
| null |
| Exception | Description |
|---|---|
| \BadMethodCallException |

offsetUnset(string $name) : nullDeletes a LDAP attribute.
Implements ArrayAccess.
This method deletes the attribute.
This is an offline method.
| Name | Type | Description |
|---|---|---|
| $name | string |
| Type | Description |
|---|---|
| null |
| Exception | Description |
|---|---|
| \BadMethodCallException |

reload(\Zend_Ldap $ldap = null) : \Zend_Ldap_Node_AbstractReload node attributes from LDAP.
This is an online method.
| Name | Type | Description |
|---|---|---|
| $ldap | \Zend_Ldap |
| Type | Description |
|---|---|
| \Zend_Ldap_Node_Abstract | Provides a fluid interface |
| Exception | Description |
|---|---|
| \Zend_Ldap_Exception |

toArray(boolean $includeSystemAttributes = true) : arrayReturns an array representation of the current node
| Name | Type | Description |
|---|---|---|
| $includeSystemAttributes | boolean |
| Type | Description |
|---|---|
| array |

toJson(boolean $includeSystemAttributes = true) : stringReturns a JSON representation of the current node
| Name | Type | Description |
|---|---|---|
| $includeSystemAttributes | boolean |
| Type | Description |
|---|---|
| string |