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 = false
Controls iteration status
Default valuefalse
Details- Type
- boolean
Methods
__unset(string $name) : null
Deletes a LDAP attribute.
This method deletes the attribute.
This is an offline method.
ParametersName | Type | Description |
---|
$name | string | |
---|
ReturnsThrows_ensureRdnAttributeValues(boolean $overwrite = false) : void
Ensures that teh RDN attributes are correctly set.
ParametersName | Type | Description |
---|
$overwrite | boolean | True to overwrite the RDN attributes |
---|
_getDn() : \Zend_Ldap_Dn
Gets the DN of the current node as a Zend_Ldap_Dn.
This is an offline method.
Returns_markAsToBeDeleted(boolean $delete) : void
Marks this node as to be deleted.
Node will be deleted on calling update() if $delete is true.
ParametersName | Type | Description |
---|
$delete | boolean | |
---|
_postAdd() : void
Allows post-add logic to be applied to node.
Subclasses may override this method.
_postDelete() : void
Allows post-delete logic to be applied to node.
Subclasses may override this method.
_postRename() : void
Allows post-rename logic to be applied to node.
Subclasses may override this method.
_postUpdate() : void
Allows post-update logic to be applied to node.
Subclasses may override this method.
_preAdd() : void
Allows pre-add logic to be applied to node.
Subclasses may override this method.
_preDelete() : void
Allows pre-delete logic to be applied to node.
Subclasses may override this method.
_preRename() : void
Allows pre-rename logic to be applied to node.
Subclasses may override this method.
_preUpdate() : void
Allows pre-update logic to be applied to node.
Subclasses may override this method.
_setAttribute(string $name, mixed $value, boolean $append) : void
Checks if the attribute can be set and sets it accordingly.
ParametersName | Type | Description |
---|
$name | string | |
---|
$value | mixed | |
---|
$append | boolean | |
---|
Throws _setDateTimeAttribute(string $name, integer | array $value, boolean $utc, boolean $append) : void
Checks if the attribute can be set and sets it accordingly.
ParametersName | Type | Description |
---|
$name | string | |
---|
$value | integer | array | |
---|
$utc | boolean | |
---|
$append | boolean | |
---|
Throws appendObjectClass(array | string $value) : \Zend_Ldap_Node
Appends to the objectClass.
This is an offline method.
ParametersName | Type | Description |
---|
$value | array | string | |
---|
ReturnsThrowsappendToAttribute(string $name, mixed $value) : \Zend_Ldap_Node
Appends to a LDAP attribute.
This is an offline method.
ParametersName | Type | Description |
---|
$name | string | |
---|
$value | mixed | |
---|
ReturnsThrowsappendToDateTimeAttribute(string $name, integer | array $value, boolean $utc = false) : \Zend_Ldap_Node
Appends to a LDAP date/time attribute.
This is an offline method.
ParametersName | Type | Description |
---|
$name | string | |
---|
$value | integer | array | |
---|
$utc | boolean | |
---|
ReturnsThrowsattachLdap(\Zend_Ldap $ldap) : \Zend_Ldap_Node
Attach node to an LDAP connection
This is an offline method.
ParametersReturnsThrowsDetails- Uses
-
countChildren() : integer
Count children of current node.
This is an online method.
ReturnsThrowscountSubtree(string | \Zend_Ldap_Filter_Abstract $filter, integer $scope = \Zend_Ldap::SEARCH_SCOPE_SUB) : integer
Count items in current subtree found by given filter.
This is an online method.
ParametersReturnsThrowscreate(string | array | \Zend_Ldap_Dn $dn, array $objectClass = array()) : \Zend_Ldap_Node
staticFactory method to create a new detached Zend_Ldap_Node for a given DN.
ParametersName | Type | Description |
---|
$dn | string | array | \Zend_Ldap_Dn | |
---|
$objectClass | array | |
---|
ReturnsThrows current() : array
Return the current attribute.
Implements Iterator
Returnsdelete() : \Zend_Ldap_Node
Marks this node as to be deleted
Node will be deleted on calling update() if $delete is true.
ReturnsdeleteAttribute(string $name) : \Zend_Ldap_Node
Deletes a LDAP attribute.
This method deletes the attribute.
This is an offline method.
ParametersName | Type | Description |
---|
$name | string | |
---|
ReturnsThrowsdetachLdap() : \Zend_Ldap_Node
Detach node from LDAP connection
This is an offline method.
Returnsexists(\Zend_Ldap $ldap = null) : boolean
Check if node exists on LDAP.
This is an online method.
ParametersReturnsThrowsfromArray(array $data, boolean $fromDataSource = false) : \Zend_Ldap_Node
staticFactory method to create a detached Zend_Ldap_Node from array data.
ParametersName | Type | Description |
---|
$data | array | |
---|
$fromDataSource | boolean | |
---|
ReturnsThrows getChanges() : array
Returns all changes made.
This is an offline method.
ReturnsgetChildren() : \Zend_Ldap_Node_ChildrenIterator
Returns the children for the current node.
Can be used offline but returns an empty array if children have not been retrieved yet.
ReturnsThrowsgetCurrentDn() : \Zend_Ldap_Dn
Gets 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.
ReturnshasChildren() : boolean
Checks 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.
ReturnsThrowsisAttached() : boolean
Checks if the current node is attached to a LDAP server.
This is an offline method.
ReturnsisNew() : boolean
Tells 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.
Returnskey() : string
Return the attribute name.
Implements Iterator
ReturnsoffsetUnset(string $name) : null
Deletes a LDAP attribute.
Implements ArrayAccess.
This method deletes the attribute.
This is an offline method.
ParametersName | Type | Description |
---|
$name | string | |
---|
ReturnsThrowsreload(\Zend_Ldap $ldap = null) : \Zend_Ldap_Node
Reload node attributes from LDAP.
This is an online method.
ParametersReturnsThrowsremoveDuplicatesFromAttribute(string $attribName) : void
Removes duplicate values from a LDAP attribute
ParametersName | Type | Description |
---|
$attribName | string | |
---|
removeFromAttribute(string $attribName, mixed | array $value) : void
Remove given values from a LDAP attribute
ParametersName | Type | Description |
---|
$attribName | string | |
---|
$value | mixed | array | |
---|
setDateTimeAttribute(string $name, integer | array $value, boolean $utc = false) : \Zend_Ldap_Node
Sets a LDAP date/time attribute.
This is an offline method.
ParametersName | Type | Description |
---|
$name | string | |
---|
$value | integer | array | |
---|
$utc | boolean | |
---|
ReturnsThrowssetDn(\Zend_Ldap_Dn | string | array $newDn) : \Zend_Ldap_Node
Sets the new DN for this node
This is an offline method.
ParametersReturnsThrowstoLdif(array $options = array()) : string
Returns a LDIF representation of the current node
ParametersName | Type | Description |
---|
$options | array | Additional options used during encoding |
---|
Returns valid() : boolean
Check if there is a current attribute
after calls to rewind() or next().
Implements Iterator
Returns