Zend Framework
1.12
|
Public Member Functions | |
__sleep () | |
Serialization callback. | |
__wakeup () | |
Deserialization callback. | |
getLdap () | |
Gets the current LDAP connection. | |
attachLdap (Zend_Ldap $ldap) | |
Attach node to an LDAP connection. | |
detachLdap () | |
Detach node from LDAP connection. | |
isAttached () | |
Checks if the current node is attached to a LDAP server. | |
isNew () | |
Tells if the node is consiedered as new (not present on the server) | |
willBeDeleted () | |
Is this node going to be deleted once update() is called? | |
delete () | |
Marks this node as to be deleted. | |
willBeMoved () | |
Is this node going to be moved once update() is called? | |
update (Zend_Ldap $ldap=null) | |
Sends all pending changes to the LDAP server. | |
getCurrentDn () | |
Gets the current DN of the current node as a Zend_Ldap_Dn. | |
setDn ($newDn) | |
Sets the new DN for this node. | |
move ($newDn) | |
{ | |
rename ($newDn) | |
{ | |
setObjectClass ($value) | |
Sets the objectClass. | |
appendObjectClass ($value) | |
Appends to the objectClass. | |
toLdif (array $options=array()) | |
Returns a LDIF representation of the current node. | |
getChangedData () | |
Gets changed node data. | |
getChanges () | |
Returns all changes made. | |
setAttribute ($name, $value) | |
Sets a LDAP attribute. | |
appendToAttribute ($name, $value) | |
Appends to a LDAP attribute. | |
setDateTimeAttribute ($name, $value, $utc=false) | |
Sets a LDAP date/time attribute. | |
appendToDateTimeAttribute ($name, $value, $utc=false) | |
Appends to a LDAP date/time attribute. | |
setPasswordAttribute ($password, $hashType=Zend_Ldap_Attribute::PASSWORD_HASH_MD5, $attribName= 'userPassword') | |
Sets a LDAP password. | |
deleteAttribute ($name) | |
Deletes a LDAP attribute. | |
removeDuplicatesFromAttribute ($attribName) | |
Removes duplicate values from a LDAP attribute. | |
removeFromAttribute ($attribName, $value) | |
Remove given values from a LDAP attribute. | |
__set ($name, $value) | |
Sets a LDAP attribute. | |
__unset ($name) | |
Deletes a LDAP attribute. | |
offsetSet ($name, $value) | |
Sets a LDAP attribute. | |
offsetUnset ($name) | |
Deletes a LDAP attribute. | |
exists (Zend_Ldap $ldap=null) | |
Check if node exists on LDAP. | |
reload (Zend_Ldap $ldap=null) | |
Reload node attributes from LDAP. | |
searchSubtree ($filter, $scope=Zend_Ldap::SEARCH_SCOPE_SUB, $sort=null) | |
Search current subtree with given options. | |
countSubtree ($filter, $scope=Zend_Ldap::SEARCH_SCOPE_SUB) | |
Count items in current subtree found by given filter. | |
countChildren () | |
Count children of current node. | |
searchChildren ($filter, $sort=null) | |
Gets children of current node. | |
hasChildren () | |
Checks if current node has children. | |
getChildren () | |
Returns the children for the current node. | |
getParent (Zend_Ldap $ldap=null) | |
Returns the parent of the current node. | |
current () | |
Return the current attribute. | |
key () | |
Return the attribute name. | |
next () | |
Move forward to next attribute. | |
rewind () | |
Rewind the Iterator to the first attribute. | |
valid () | |
Check if there is a current attribute after calls to rewind() or next(). | |
![]() | |
reload (Zend_Ldap $ldap=null) | |
Reload node attributes from LDAP. | |
getDn () | |
Gets the DN of the current node as a Zend_Ldap_Dn. | |
getDnString ($caseFold=null) | |
Gets the DN of the current node as a string. | |
getDnArray ($caseFold=null) | |
Gets the DN of the current node as an array. | |
getRdnString ($caseFold=null) | |
Gets the RDN of the current node as a string. | |
getRdnArray ($caseFold=null) | |
Gets the RDN of the current node as an array. | |
getObjectClass () | |
Gets the objectClass of the node. | |
getAttributes ($includeSystemAttributes=true) | |
Gets all attributes of node. | |
toString () | |
Returns the DN of the current node. | |
__toString () | |
Cast to string representation {. | |
toArray ($includeSystemAttributes=true) | |
Returns an array representation of the current node. | |
toJson ($includeSystemAttributes=true) | |
Returns a JSON representation of the current node. | |
getData ($includeSystemAttributes=true) | |
Gets node attributes. | |
existsAttribute ($name, $emptyExists=false) | |
Checks whether a given attribute exists. | |
attributeHasValue ($attribName, $value) | |
Checks if the given value(s) exist in the attribute. | |
getAttribute ($name, $index=null) | |
Gets a LDAP attribute. | |
getDateTimeAttribute ($name, $index=null) | |
Gets a LDAP date/time attribute. | |
__set ($name, $value) | |
Sets a LDAP attribute. | |
__get ($name) | |
Gets a LDAP attribute. | |
__unset ($name) | |
Deletes a LDAP attribute. | |
__isset ($name) | |
Checks whether a given attribute exists. | |
offsetSet ($name, $value) | |
Sets a LDAP attribute. | |
offsetGet ($name) | |
Gets a LDAP attribute. | |
offsetUnset ($name) | |
Deletes a LDAP attribute. | |
offsetExists ($name) | |
Checks whether a given attribute exists. | |
count () | |
Returns the number of attributes in node. | |
Static Public Member Functions | |
static | create ($dn, array $objectClass=array()) |
Factory method to create a new detached Zend_Ldap_Node for a given DN. | |
static | fromLdap ($dn, Zend_Ldap $ldap) |
Factory method to create an attached Zend_Ldap_Node for a given DN. | |
static | fromArray (array $data, $fromDataSource=false) |
Factory method to create a detached Zend_Ldap_Node from array data. | |
Protected Member Functions | |
__construct (Zend_Ldap_Dn $dn, array $data, $fromDataSource, Zend_Ldap $ldap=null) | |
Constructor. | |
_loadData (array $data, $fromDataSource) | |
_ensureRdnAttributeValues ($overwrite=false) | |
Ensures that teh RDN attributes are correctly set. | |
_markAsNew ($new) | |
Marks this node as new. | |
_markAsToBeDeleted ($delete) | |
Marks this node as to be deleted. | |
_getDn () | |
Gets the DN of the current node as a Zend_Ldap_Dn. | |
_setAttribute ($name, $value, $append) | |
Checks if the attribute can be set and sets it accordingly. | |
_setDateTimeAttribute ($name, $value, $utc, $append) | |
Checks if the attribute can be set and sets it accordingly. | |
_assertChangeableAttribute ($name) | |
_preDelete () | |
Allows pre-delete logic to be applied to node. | |
_postDelete () | |
Allows post-delete logic to be applied to node. | |
_preAdd () | |
Allows pre-add logic to be applied to node. | |
_postAdd () | |
Allows post-add logic to be applied to node. | |
_preRename () | |
Allows pre-rename logic to be applied to node. | |
_postRename () | |
Allows post-rename logic to be applied to node. | |
_preUpdate () | |
Allows pre-update logic to be applied to node. | |
_postUpdate () | |
Allows post-update logic to be applied to node. | |
![]() | |
__construct (Zend_Ldap_Dn $dn, array $data, $fromDataSource) | |
Constructor. | |
_loadData (array $data, $fromDataSource) | |
_getDn () | |
Gets the DN of the current node as a Zend_Ldap_Dn. | |
Protected Attributes | |
$_newDn | |
$_originalData | |
$_new | |
$_delete | |
$_ldap | |
$_children | |
![]() | |
$_dn | |
$_currentData | |
Additional Inherited Members | |
![]() | |
static | $_systemAttributes |
|
protected |
Constructor.
Constructor is protected to enforce the use of factory methods.
Zend_Ldap_Dn | $dn | |
array | $data | |
boolean | $fromDataSource | |
Zend_Ldap | $ldap |
Zend_Ldap_Exception |
__set | ( | $name, | |
$value | |||
) |
Sets a LDAP attribute.
This is an offline method.
string | $name | |
mixed | $value |
Zend_Ldap_Exception |
__sleep | ( | ) |
Serialization callback.
Only DN and attributes will be serialized.
__unset | ( | $name | ) |
Deletes a LDAP attribute.
This method deletes the attribute.
This is an offline method.
string | $name |
Zend_Ldap_Exception |
__wakeup | ( | ) |
Deserialization callback.
Enforces a detached node.
|
protected |
|
protected |
Ensures that teh RDN attributes are correctly set.
boolean | $overwrite | True to overwrite the RDN attributes |
|
protected |
|
protected |
array | $data | |
boolean | $fromDataSource |
Zend_Ldap_Exception |
|
protected |
Marks this node as new.
Node will be added (instead of updated) on calling update() if $new is true.
boolean | $new |
|
protected |
Marks this node as to be deleted.
Node will be deleted on calling update() if $delete is true.
boolean | $delete |
|
protected |
Allows post-add logic to be applied to node.
Subclasses may override this method.
|
protected |
Allows post-delete logic to be applied to node.
Subclasses may override this method.
|
protected |
Allows post-rename logic to be applied to node.
Subclasses may override this method.
|
protected |
Allows post-update logic to be applied to node.
Subclasses may override this method.
|
protected |
Allows pre-add logic to be applied to node.
Subclasses may override this method.
|
protected |
Allows pre-delete logic to be applied to node.
Subclasses may override this method.
|
protected |
Allows pre-rename logic to be applied to node.
Subclasses may override this method.
|
protected |
Allows pre-update logic to be applied to node.
Subclasses may override this method.
|
protected |
Checks if the attribute can be set and sets it accordingly.
string | $name | |
mixed | $value | |
boolean | $append |
Zend_Ldap_Exception |
|
protected |
Checks if the attribute can be set and sets it accordingly.
string | $name | |
integer | array | $value | |
boolean | $utc | |
boolean | $append |
Zend_Ldap_Exception |
appendObjectClass | ( | $value | ) |
Appends to the objectClass.
This is an offline method.
array | string | $value |
Zend_Ldap_Exception |
appendToAttribute | ( | $name, | |
$value | |||
) |
Appends to a LDAP attribute.
This is an offline method.
string | $name | |
mixed | $value |
Zend_Ldap_Exception |
appendToDateTimeAttribute | ( | $name, | |
$value, | |||
$utc = false |
|||
) |
Appends to a LDAP date/time attribute.
This is an offline method.
string | $name | |
integer | array | $value | |
boolean | $utc |
Zend_Ldap_Exception |
attachLdap | ( | Zend_Ldap | $ldap | ) |
Attach node to an LDAP connection.
This is an offline method.
Zend_Ldap | $ldap |
Zend_Ldap_Exception |
countChildren | ( | ) |
Count children of current node.
This is an online method.
Zend_Ldap_Exception |
countSubtree | ( | $filter, | |
$scope = Zend_Ldap::SEARCH_SCOPE_SUB |
|||
) |
Count items in current subtree found by given filter.
This is an online method.
string | Zend_Ldap_Filter_Abstract | $filter | |
integer | $scope |
Zend_Ldap_Exception |
|
static |
Factory method to create a new detached Zend_Ldap_Node for a given DN.
string | array | Zend_Ldap_Dn | $dn | |
array | $objectClass |
Zend_Ldap_Exception |
current | ( | ) |
Return the current attribute.
Implements Iterator
delete | ( | ) |
Marks this node as to be deleted.
Node will be deleted on calling update() if $delete is true.
deleteAttribute | ( | $name | ) |
Deletes a LDAP attribute.
This method deletes the attribute.
This is an offline method.
string | $name |
Zend_Ldap_Exception |
detachLdap | ( | ) |
Detach node from LDAP connection.
This is an offline method.
exists | ( | Zend_Ldap | $ldap = null | ) |
Check if node exists on LDAP.
This is an online method.
Zend_Ldap | $ldap |
Zend_Ldap_Exception |
|
static |
Factory method to create a detached Zend_Ldap_Node from array data.
array | $data | |
boolean | $fromDataSource |
Zend_Ldap_Exception |
|
static |
Factory method to create an attached Zend_Ldap_Node for a given DN.
string | array | Zend_Ldap_Dn | $dn | |
Zend_Ldap | $ldap |
Zend_Ldap_Exception |
getChangedData | ( | ) |
Gets changed node data.
The array contains all changed attributes. This format can be used in Zend_Ldap::add() and Zend_Ldap::update().
This is an offline method.
getChanges | ( | ) |
Returns all changes made.
This is an offline method.
getChildren | ( | ) |
Returns the children for the current node.
Can be used offline but returns an empty array if children have not been retrieved yet.
Zend_Ldap_Exception |
getCurrentDn | ( | ) |
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.
getLdap | ( | ) |
Gets the current LDAP connection.
Zend_Ldap_Exception |
getParent | ( | Zend_Ldap | $ldap = null | ) |
Returns the parent of the current node.
Zend_Ldap | $ldap |
Zend_Ldap_Exception |
hasChildren | ( | ) |
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.
Zend_Ldap_Exception |
isAttached | ( | ) |
Checks if the current node is attached to a LDAP server.
This is an offline method.
isNew | ( | ) |
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 exits() to see if a node is already there.
key | ( | ) |
Return the attribute name.
Implements Iterator
move | ( | $newDn | ) |
{
This is an offline method.
Zend_Ldap_Dn | string | array | $newDn |
Zend_Ldap_Exception |
next | ( | ) |
Move forward to next attribute.
Implements Iterator
offsetSet | ( | $name, | |
$value | |||
) |
Sets a LDAP attribute.
Implements ArrayAccess.
This is an offline method.
string | $name | |
mixed | $value |
Zend_Ldap_Exception |
offsetUnset | ( | $name | ) |
Deletes a LDAP attribute.
Implements ArrayAccess.
This method deletes the attribute.
This is an offline method.
string | $name |
Zend_Ldap_Exception |
reload | ( | Zend_Ldap | $ldap = null | ) |
Reload node attributes from LDAP.
This is an online method.
Zend_Ldap | $ldap |
Zend_Ldap_Exception |
removeDuplicatesFromAttribute | ( | $attribName | ) |
Removes duplicate values from a LDAP attribute.
string | $attribName |
removeFromAttribute | ( | $attribName, | |
$value | |||
) |
Remove given values from a LDAP attribute.
string | $attribName | |
mixed | array | $value |
rename | ( | $newDn | ) |
{
This is an offline method.
Zend_Ldap_Dn | string | array | $newDn |
Zend_Ldap_Exception |
rewind | ( | ) |
Rewind the Iterator to the first attribute.
Implements Iterator
searchChildren | ( | $filter, | |
$sort = null |
|||
) |
Gets children of current node.
This is an online method.
string | Zend_Ldap_Filter_Abstract | $filter | |
string | $sort |
Zend_Ldap_Exception |
searchSubtree | ( | $filter, | |
$scope = Zend_Ldap::SEARCH_SCOPE_SUB , |
|||
$sort = null |
|||
) |
Search current subtree with given options.
This is an online method.
string | Zend_Ldap_Filter_Abstract | $filter | |
integer | $scope | |
string | $sort |
Zend_Ldap_Exception |
setAttribute | ( | $name, | |
$value | |||
) |
Sets a LDAP attribute.
This is an offline method.
string | $name | |
mixed | $value |
Zend_Ldap_Exception |
setDateTimeAttribute | ( | $name, | |
$value, | |||
$utc = false |
|||
) |
Sets a LDAP date/time attribute.
This is an offline method.
string | $name | |
integer | array | $value | |
boolean | $utc |
Zend_Ldap_Exception |
setDn | ( | $newDn | ) |
Sets the new DN for this node.
This is an offline method.
Zend_Ldap_Dn | string | array | $newDn |
Zend_Ldap_Exception |
setObjectClass | ( | $value | ) |
Sets the objectClass.
This is an offline method.
array | string | $value |
Zend_Ldap_Exception |
setPasswordAttribute | ( | $password, | |
$hashType = Zend_Ldap_Attribute::PASSWORD_HASH_MD5 , |
|||
$attribName = 'userPassword' |
|||
) |
Sets a LDAP password.
string | $password | |
string | $hashType | |
string | $attribName |
Zend_Ldap_Exception |
toLdif | ( | array | $options = array() | ) |
Returns a LDIF representation of the current node.
array | $options | Additional options used during encoding |
update | ( | Zend_Ldap | $ldap = null | ) |
Sends all pending changes to the LDAP server.
Zend_Ldap | $ldap |
Zend_Ldap_Exception |
valid | ( | ) |
willBeDeleted | ( | ) |
Is this node going to be deleted once update() is called?
willBeMoved | ( | ) |
Is this node going to be moved once update() is called?
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |