Ldap/Node.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 license@zend.com so we can send you a copy immediately.
- Category
- Zend
- Copyright
- Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
- Package
- Zend_Ldap
- Subpackage
- Node
- Version
- $Id$
Package: Zend_Ldap\NodeZend_Ldap_Node provides an object oriented view into a LDAP node.
- Implements
- Parent(s)
- \Zend_Ldap_Node_Abstract
- Category
- Zend
- Copyright
- Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
Properties



boolean $_iteratorRewind = falseControls iteration status
Default valuefalseDetails- Type
- boolean
Methods



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


_ensureRdnAttributeValues(boolean $overwrite = false) : voidEnsures that teh RDN attributes are correctly set.
Parameters| Name | Type | Description |
|---|
| $overwrite | boolean | True to overwrite the RDN attributes |
|---|



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


_markAsToBeDeleted(boolean $delete) : voidMarks this node as to be deleted.
Node will be deleted on calling update() if $delete is true.
Parameters| Name | Type | Description |
|---|
| $delete | boolean | |
|---|



_postAdd() : voidAllows post-add logic to be applied to node.
Subclasses may override this method.



_postDelete() : voidAllows post-delete logic to be applied to node.
Subclasses may override this method.



_postRename() : voidAllows post-rename logic to be applied to node.
Subclasses may override this method.



_postUpdate() : voidAllows post-update logic to be applied to node.
Subclasses may override this method.



_preAdd() : voidAllows pre-add logic to be applied to node.
Subclasses may override this method.



_preDelete() : voidAllows pre-delete logic to be applied to node.
Subclasses may override this method.



_preRename() : voidAllows pre-rename logic to be applied to node.
Subclasses may override this method.



_preUpdate() : voidAllows pre-update logic to be applied to node.
Subclasses may override this method.



_setAttribute(string $name, mixed $value, boolean $append) : voidChecks if the attribute can be set and sets it accordingly.
Parameters| Name | Type | Description |
|---|
| $name | string | |
|---|
| $value | mixed | |
|---|
| $append | boolean | |
|---|
Throws 


_setDateTimeAttribute(string $name, integer | array $value, boolean $utc, boolean $append) : voidChecks if the attribute can be set and sets it accordingly.
Parameters| Name | Type | Description |
|---|
| $name | string | |
|---|
| $value | integer | array | |
|---|
| $utc | boolean | |
|---|
| $append | boolean | |
|---|
Throws 


appendObjectClass(array | string $value) : \Zend_Ldap_NodeAppends to the objectClass.
This is an offline method.
Parameters| Name | Type | Description |
|---|
| $value | array | string | |
|---|
ReturnsThrows


appendToAttribute(string $name, mixed $value) : \Zend_Ldap_NodeAppends to a LDAP attribute.
This is an offline method.
Parameters| Name | Type | Description |
|---|
| $name | string | |
|---|
| $value | mixed | |
|---|
ReturnsThrows


appendToDateTimeAttribute(string $name, integer | array $value, boolean $utc = false) : \Zend_Ldap_NodeAppends to a LDAP date/time attribute.
This is an offline method.
Parameters| Name | Type | Description |
|---|
| $name | string | |
|---|
| $value | integer | array | |
|---|
| $utc | boolean | |
|---|
ReturnsThrows


attachLdap(\Zend_Ldap $ldap) : \Zend_Ldap_NodeAttach node to an LDAP connection
This is an offline method.
ParametersReturnsThrowsDetails- Uses
-



countChildren() : integerCount children of current node.
This is an online method.
ReturnsThrows


countSubtree(string | \Zend_Ldap_Filter_Abstract $filter, integer $scope = \Zend_Ldap::SEARCH_SCOPE_SUB) : integerCount items in current subtree found by given filter.
This is an online method.
ParametersReturnsThrows


create(string | array | \Zend_Ldap_Dn $dn, array $objectClass = array()) : \Zend_Ldap_NodestaticFactory method to create a new detached Zend_Ldap_Node for a given DN.
Parameters| Name | Type | Description |
|---|
| $dn | string | array | \Zend_Ldap_Dn | |
|---|
| $objectClass | array | |
|---|
ReturnsThrows 


current() : arrayReturn the current attribute.
Implements Iterator
Returns


delete() : \Zend_Ldap_NodeMarks this node as to be deleted
Node will be deleted on calling update() if $delete is true.
Returns


deleteAttribute(string $name) : \Zend_Ldap_NodeDeletes a LDAP attribute.
This method deletes the attribute.
This is an offline method.
Parameters| Name | Type | Description |
|---|
| $name | string | |
|---|
ReturnsThrows


detachLdap() : \Zend_Ldap_NodeDetach node from LDAP connection
This is an offline method.
Returns


exists(\Zend_Ldap $ldap = null) : booleanCheck if node exists on LDAP.
This is an online method.
ParametersReturnsThrows


fromArray(array $data, boolean $fromDataSource = false) : \Zend_Ldap_NodestaticFactory method to create a detached Zend_Ldap_Node from array data.
Parameters| Name | Type | Description |
|---|
| $data | array | |
|---|
| $fromDataSource | boolean | |
|---|
ReturnsThrows 


getChanges() : arrayReturns all changes made.
This is an offline method.
Returns


getChildren() : \Zend_Ldap_Node_ChildrenIteratorReturns the children for the current node.
Can be used offline but returns an empty array if children have not been retrieved yet.
ReturnsThrows


getCurrentDn() : \Zend_Ldap_DnGets the current 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.
Returns


hasChildren() : booleanChecks if current node has children.
Returns whether the current element has children.
Can be used offline but returns false if children have not been retrieved yet.
ReturnsThrows


isAttached() : booleanChecks if the current node is attached to a LDAP server.
This is an offline method.
Returns


isNew() : booleanTells if the node is consiedered as new (not present on the server)
Please note, that this doesn't tell you if the node is present on the server.
Use {@link exits()} to see if a node is already there.
Returns


key() : stringReturn the attribute name.
Implements Iterator
Returns


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


reload(\Zend_Ldap $ldap = null) : \Zend_Ldap_NodeReload node attributes from LDAP.
This is an online method.
ParametersReturnsThrows


removeDuplicatesFromAttribute(string $attribName) : voidRemoves duplicate values from a LDAP attribute
Parameters| Name | Type | Description |
|---|
| $attribName | string | |
|---|



removeFromAttribute(string $attribName, mixed | array $value) : voidRemove given values from a LDAP attribute
Parameters| Name | Type | Description |
|---|
| $attribName | string | |
|---|
| $value | mixed | array | |
|---|



setDateTimeAttribute(string $name, integer | array $value, boolean $utc = false) : \Zend_Ldap_NodeSets a LDAP date/time attribute.
This is an offline method.
Parameters| Name | Type | Description |
|---|
| $name | string | |
|---|
| $value | integer | array | |
|---|
| $utc | boolean | |
|---|
ReturnsThrows


setDn(\Zend_Ldap_Dn | string | array $newDn) : \Zend_Ldap_NodeSets the new DN for this node
This is an offline method.
ParametersReturnsThrows


toLdif(array $options = array()) : stringReturns a LDIF representation of the current node
Parameters| Name | Type | Description |
|---|
| $options | array | Additional options used during encoding |
|---|
Returns 


valid() : booleanCheck if there is a current attribute
after calls to rewind() or next().
Implements Iterator
Returns