Zend\Ldap\Node
Zend\Ldap\Node provides an object oriented view into a LDAP node.
Synopsis
class Node
extends AbstractNode
implements
Iterator,RecursiveIterator
{
- // members
- protected Dn $newDn;
- protected array $originalData;
- protected bool $new;
- protected bool $delete;
- protected Ldap $ldap;
- protected array $children;
- private bool $iteratorRewind;
- protected EventManager $events;
- // Inherited members from AbstractNode
- protected array $systemAttributes;
- protected Dn $dn;
- protected array $currentData;
- // methods
- protected void __construct()
- public array __sleep()
- public void __wakeup()
- public Ldap getLdap()
- public Node attachLdap()
- public Node detachLdap()
- public bool isAttached()
- protected void triggerEvent()
- protected void loadData()
- public static Node create()
- public static Node|null fromLdap()
- public static Node fromArray()
- protected void ensureRdnAttributeValues()
- protected void markAsNew()
- public bool isNew()
- protected void markAsToBeDeleted()
- public bool willBeDeleted()
- public Node delete()
- public bool willBeMoved()
- public Node update()
- protected Dn _getDn()
- public Dn getCurrentDn()
- public Node setDn()
- public Node move()
- public Node rename()
- public Node setObjectClass()
- public Node appendObjectClass()
- public string toLdif()
- public array getChangedData()
- public array getChanges()
- public Node setAttribute()
- public Node appendToAttribute()
- protected void _setAttribute()
- public Node setDateTimeAttribute()
- public Node appendToDateTimeAttribute()
- protected void _setDateTimeAttribute()
- public Node setPasswordAttribute()
- public Node deleteAttribute()
- public void removeDuplicatesFromAttribute()
- public void removeFromAttribute()
- protected bool assertChangeableAttribute()
- public void __set()
- public void __unset()
- public void offsetSet()
- public void offsetUnset()
- public bool exists()
- public Node reload()
- public Collection searchSubtree()
- public int countSubtree()
- public int countChildren()
- public Collection searchChildren()
- public bool hasChildren()
- public ChildrenIterator getChildren()
- public Node getParent()
- public array current()
- public string key()
- public void next()
- public void rewind()
- public bool valid()
- // Inherited methods from AbstractNode
- protected void __construct()
- protected void loadData()
- public AbstractNode reload()
- protected Dn _getDn()
- public Dn getDn()
- public string getDnString()
- public array getDnArray()
- public string getRdnString()
- public array getRdnArray()
- public array getObjectClass()
- public array getAttributes()
- public string toString()
- public string __toString()
- public array toArray()
- public string toJson()
- public array getData()
- public bool existsAttribute()
- public bool attributeHasValue()
- public mixed getAttribute()
- public array|int getDateTimeAttribute()
- public void __set()
- public mixed __get()
- public void __unset()
- public bool __isset()
- public void offsetSet()
- public mixed offsetGet()
- public void offsetUnset()
- public bool offsetExists()
- public int count()
Hierarchy
Members
private
- $iteratorRewind
—
Zend\Ldap\bool
Controls iteration status
protected
- $children
—
array
Holds an array of the current node's children. - $currentData
—
array
Holds the node's current data. - $delete
—
Zend\Ldap\bool
This node will be deleted - $dn
—
\Zend\Ldap\Dn
Holds the node's DN. - $events — Zend\EventManager\EventManager
- $ldap
—
Zend\Ldap\Ldap
Holds the connection to the LDAP server if in connected mode. - $new
—
Zend\Ldap\bool
This node will be added - $newDn
—
Zend\Ldap\Dn
Holds the node's new Dn if node is renamed. - $originalData
—
array
Holds the node's original attributes (as loaded). - $systemAttributes
Methods
protected
- __construct() — Constructor.
- _getDn() — Gets the DN of the current node as a Zend\Ldap\Dn.
- _setAttribute() — Checks if the attribute can be set and sets it accordingly.
- _setDateTimeAttribute() — Checks if the attribute can be set and sets it accordingly.
- assertChangeableAttribute()
- ensureRdnAttributeValues() — Ensures that teh RDN attributes are correctly set.
- loadData()
- markAsNew() — Marks this node as new.
- markAsToBeDeleted() — Marks this node as to be deleted.
- triggerEvent() — Trigger an event
public
- __set() — Sets a LDAP attribute.
- __sleep() — Serialization callback
- __unset() — Deletes a LDAP attribute.
- __wakeup() — Deserialization callback
- appendObjectClass() — Appends to the objectClass.
- appendToAttribute() — Appends to a LDAP attribute.
- appendToDateTimeAttribute() — Appends to a LDAP date/time attribute.
- attachLdap() — Attach node to an LDAP connection
- countChildren() — Count children of current node.
- countSubtree() — Count items in current subtree found by given filter.
- create() — Factory method to create a new detached Zend\Ldap\Node for a given DN.
- current() — Return the current attribute.
- delete() — Marks this node as to be deleted
- deleteAttribute() — Deletes a LDAP attribute.
- detachLdap() — Detach node from LDAP connection
- exists() — Check if node exists on LDAP.
- fromArray() — Factory method to create a detached Zend\Ldap\Node from array data.
- fromLdap() — Factory method to create an attached Zend\Ldap\Node for a given DN.
- getChangedData() — Gets changed node data.
- getChanges() — Returns all changes made.
- getChildren() — Returns the children for the current node.
- getCurrentDn() — Gets the current DN of the current node as a Zend\Ldap\Dn.
- getLdap() — Gets the current LDAP connection.
- getParent() — Returns the parent of the current node.
- hasChildren() — Checks if current node has children.
- isAttached() — Checks if the current node is attached to a LDAP server.
- isNew() — Tells if the node is considered as new (not present on the server)
- key() — Return the attribute name.
- move() — {@see setDn()}
- next() — Move forward to next attribute.
- offsetSet() — Sets a LDAP attribute.
- offsetUnset() — Deletes a LDAP attribute.
- reload() — Reload node attributes from LDAP.
- removeDuplicatesFromAttribute() — Removes duplicate values from a LDAP attribute
- removeFromAttribute() — Remove given values from a LDAP attribute
- rename() — {@see setDn()}
- rewind() — Rewind the Iterator to the first attribute.
- searchChildren() — Gets children of current node.
- searchSubtree() — Search current subtree with given options.
- setAttribute() — Sets a LDAP attribute.
- setDateTimeAttribute() — Sets a LDAP date/time attribute.
- setDn() — Sets the new DN for this node
- setObjectClass() — Sets the objectClass.
- setPasswordAttribute() — Sets a LDAP password.
- toLdif() — Returns a LDIF representation of the current node
- update() — Sends all pending changes to the LDAP server
- valid() — Check if there is a current attribute after calls to rewind() or next().
- willBeDeleted() — Is this node going to be deleted once update() is called?
- willBeMoved() — Is this node going to be moved once update() is called?
Inherited from Zend\Ldap\Node\AbstractNode
protected
- _getDn() — Gets the DN of the current node as a Zend\Ldap\Dn.
- loadData()
public
- __get() — Gets a LDAP attribute.
- __isset() — Checks whether a given attribute exists.
- __set() — Sets a LDAP attribute.
- __toString() — Cast to string representation {@see toString()}
- __unset() — Deletes a LDAP attribute.
- attributeHasValue() — Checks if the given value(s) exist in the attribute
- count() — Returns the number of attributes in node.
- existsAttribute() — Checks whether a given attribute exists.
- getAttribute() — Gets a LDAP attribute.
- getAttributes() — Gets all attributes of node.
- getData() — Gets node attributes.
- getDateTimeAttribute() — Gets a LDAP date/time attribute.
- getDn() — Gets the DN of the current node as a Zend\Ldap\Dn.
- getDnArray() — Gets the DN of the current node as an array.
- getDnString() — Gets the DN of the current node as a string.
- getObjectClass() — Gets the objectClass of the node
- getRdnArray() — Gets the RDN of the current node as an array.
- getRdnString() — Gets the RDN of the current node as a string.
- offsetExists() — Checks whether a given attribute exists.
- offsetGet() — Gets a LDAP attribute.
- offsetSet() — Sets a LDAP attribute.
- offsetUnset() — Deletes a LDAP attribute.
- reload() — Reload node attributes from LDAP.
- toArray() — Returns an array representation of the current node
- toJson() — Returns a JSON representation of the current node
- toString() — Returns the DN of the current node. {@see getDnString()}