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.
Zend_Ldap_Node provides an object oriented view into a LDAP node.
array $_children = ''Holds an array of the current node's children.
Detailsboolean $_delete = ''This node will be deleted
Detailsboolean $_iteratorRewind = 'false'Controls iteration status
DetailsZend_Ldap $_ldap = ''Holds the connection to the LDAP server if in connected mode.
Detailsboolean $_new = ''This node will be added
DetailsZend_Ldap_Dn $_newDn = ''Holds the node's new DN if node is renamed.
Detailsarray $_originalData = ''Holds the node's orginal attributes (as loaded).
Details__construct(
Zend_Ldap_Dn $dn, array $data, boolean $fromDataSource, Zend_Ldap $ldap
=
null
)
:
Constructor.
Constructor is protected to enforce the use of factory methods.
Details__set(
string $name, mixed $value
)
:
nullSets a LDAP attribute.
This is an offline method.
Details__sleep(
)
:
arraySerialization callback
Only DN and attributes will be serialized.
Details__unset(
string $name
)
:
nullDeletes a LDAP attribute.
This method deletes the attribute.
This is an offline method.
Details__wakeup(
)
:
nullDeserialization callback
Enforces a detached node.
Details_assertChangeableAttribute(
string $name
)
:
boolean
Details_ensureRdnAttributeValues(
)
:
voidEnsures that teh RDN attributes are correctly set.
Details_getDn(
)
:
Zend_Ldap_DnGets the DN of the current node as a Zend_Ldap_Dn.
This is an offline method.
Details_loadData(
array $data, boolean $fromDataSource
)
:
Details_markAsNew(
boolean $new
)
:
Marks this node as new.
Node will be added (instead of updated) on calling update() if $new is true.
Details_markAsToBeDeleted(
boolean $delete
)
:
Marks this node as to be deleted.
Node will be deleted on calling update() if $delete is true.
Details_setAttribute(
string $name, mixed $value, boolean $append
)
:
Checks if the attribute can be set and sets it accordingly.
Details_setDateTimeAttribute(
string $name, integer|array $value, boolean $utc, boolean $append
)
:
Checks if the attribute can be set and sets it accordingly.
DetailsappendObjectClass(
array|string $value
)
:
Zend_Ldap_NodeAppends to the objectClass.
This is an offline method.
DetailsappendToAttribute(
string $name, mixed $value
)
:
Zend_Ldap_NodeAppends to a LDAP attribute.
This is an offline method.
DetailsappendToDateTimeAttribute(
string $name, integer|array $value, boolean $utc
=
false
)
:
Zend_Ldap_NodeAppends to a LDAP date/time attribute.
This is an offline method.
DetailsattachLdap(
Zend_Ldap $ldap
)
:
Zend_Ldap_NodeAttach node to an LDAP connection
This is an offline method.
DetailscountChildren(
)
:
integerCount children of current node.
This is an online method.
DetailscountSubtree(
string|Zend_Ldap_Filter_Abstract $filter, integer $scope
=
Zend_Ldap
)
:
integerCount items in current subtree found by given filter.
This is an online method.
Detailscreate(
string|array|Zend_Ldap_Dn $dn, array $objectClass
=
array
)
:
Zend_Ldap_NodeFactory method to create a new detached Zend_Ldap_Node for a given DN.
Detailscurrent(
)
:
arrayReturn the current attribute.
Implements Iterator
Detailsdelete(
)
:
Zend_Ldap_NodeMarks this node as to be deleted
Node will be deleted on calling update() if $delete is true.
DetailsdeleteAttribute(
string $name
)
:
Zend_Ldap_NodeDeletes a LDAP attribute.
This method deletes the attribute.
This is an offline method.
DetailsdetachLdap(
)
:
Zend_Ldap_NodeDetach node from LDAP connection
This is an offline method.
Detailsexists(
Zend_Ldap $ldap
=
null
)
:
booleanCheck if node exists on LDAP.
This is an online method.
DetailsfromArray(
array $data, boolean $fromDataSource
=
false
)
:
Zend_Ldap_NodeFactory method to create a detached Zend_Ldap_Node from array data.
DetailsfromLdap(
string|array|Zend_Ldap_Dn $dn, Zend_Ldap $ldap
)
:
Zend_Ldap_Node|nullFactory method to create an attached Zend_Ldap_Node for a given DN.
DetailsgetChangedData(
)
:
arrayGets changed node data.
The array contains all changed attributes. This format can be used in {@link Zend_Ldap::add()} and {@link Zend_Ldap::update()}.
This is an offline method.
DetailsgetChanges(
)
:
arrayReturns all changes made.
This is an offline method.
DetailsgetChildren(
)
:
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.
DetailsgetCurrentDn(
)
:
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.
DetailsgetLdap(
)
:
Zend_LdapGets the current LDAP connection.
DetailsgetParent(
Zend_Ldap $ldap
=
null
)
:
Zend_Ldap_NodeReturns the parent of the current node.
DetailshasChildren(
)
:
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.
DetailsisAttached(
)
:
booleanChecks if the current node is attached to a LDAP server.
This is an offline method.
DetailsisNew(
)
:
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.
Detailskey(
)
:
stringReturn the attribute name.
Implements Iterator
Detailsmove(
Zend_Ldap_Dn|string|array $newDn
)
:
Zend_Ldap_Node{@see setDn()}
This is an offline method.
Detailsnext(
)
:
Move forward to next attribute.
Implements Iterator
DetailsoffsetSet(
string $name, mixed $value
)
:
nullSets a LDAP attribute.
Implements ArrayAccess.
This is an offline method.
DetailsoffsetUnset(
string $name
)
:
nullDeletes a LDAP attribute.
Implements ArrayAccess.
This method deletes the attribute.
This is an offline method.
Detailsreload(
Zend_Ldap $ldap
=
null
)
:
Zend_Ldap_NodeReload node attributes from LDAP.
This is an online method.
DetailsremoveDuplicatesFromAttribute(
string $attribName
)
:
voidRemoves duplicate values from a LDAP attribute
DetailsremoveFromAttribute(
string $attribName, mixed|array $value
)
:
voidRemove given values from a LDAP attribute
Detailsrename(
Zend_Ldap_Dn|string|array $newDn
)
:
Zend_Ldap_Node{@see setDn()}
This is an offline method.
Detailsrewind(
)
:
Rewind the Iterator to the first attribute.
Implements Iterator
DetailssearchChildren(
string|Zend_Ldap_Filter_Abstract $filter, string $sort
=
null
)
:
Zend_Ldap_Node_CollectionGets children of current node.
This is an online method.
DetailssearchSubtree(
string|Zend_Ldap_Filter_Abstract $filter, integer $scope
=
Zend_Ldap, string $sort
=
null
)
:
Zend_Ldap_Node_CollectionSearch current subtree with given options.
This is an online method.
DetailssetAttribute(
string $name, mixed $value
)
:
Zend_Ldap_NodeSets a LDAP attribute.
This is an offline method.
DetailssetDateTimeAttribute(
string $name, integer|array $value, boolean $utc
=
false
)
:
Zend_Ldap_NodeSets a LDAP date/time attribute.
This is an offline method.
DetailssetDn(
Zend_Ldap_Dn|string|array $newDn
)
:
Zend_Ldap_NodeSets the new DN for this node
This is an offline method.
DetailssetObjectClass(
array|string $value
)
:
Zend_Ldap_NodeSets the objectClass.
This is an offline method.
DetailssetPasswordAttribute(
string $password, string $hashType
=
Zend_Ldap_Attribute, string $attribName
=
userPassword
)
:
Zend_Ldap_NodeSets a LDAP password.
DetailstoLdif(
array $options
=
array
)
:
stringReturns a LDIF representation of the current node
Detailsupdate(
Zend_Ldap $ldap
=
null
)
:
Zend_Ldap_NodeSends all pending changes to the LDAP server
Detailsvalid(
)
:
booleanCheck if there is a current attribute after calls to rewind() or next().
Implements Iterator
DetailswillBeDeleted(
)
:
booleanIs this node going to be deleted once update() is called?
DetailswillBeMoved(
)
:
booleanIs this node going to be moved once update() is called?
Details