Zend Framework  1.12
Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members
Zend_Ldap_Node_Abstract Class Reference

Public Member Functions

 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.
 

Protected Member Functions

 __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

 $_dn
 
 $_currentData
 

Static Protected Attributes

static $_systemAttributes
 

Constructor & Destructor Documentation

__construct ( Zend_Ldap_Dn  $dn,
array  $data,
  $fromDataSource 
)
protected

Constructor.

Constructor is protected to enforce the use of factory methods.

Parameters
Zend_Ldap_Dn$dn
array$data
boolean$fromDataSource

Member Function Documentation

__get (   $name)

Gets a LDAP attribute.

This is an offline method.

Parameters
string$name
Returns
array
Exceptions
Zend_Ldap_Exception
__isset (   $name)

Checks whether a given attribute exists.

Empty attributes will be treated as non-existent.

Parameters
string$name
Returns
boolean
__set (   $name,
  $value 
)

Sets a LDAP attribute.

This is an offline method.

Parameters
string$name
mixed$value
Returns
null
Exceptions
BadMethodCallException
__toString ( )

Cast to string representation {.

See Also
toString()}
Returns
string
__unset (   $name)

Deletes a LDAP attribute.

This method deletes the attribute.

This is an offline method.

Parameters
string$name
Returns
null
Exceptions
BadMethodCallException
_getDn ( )
protected

Gets the DN of the current node as a Zend_Ldap_Dn.

This is an offline method.

Returns
Zend_Ldap_Dn
_loadData ( array  $data,
  $fromDataSource 
)
protected
Parameters
array$data
boolean$fromDataSource
Exceptions
Zend_Ldap_Exception
attributeHasValue (   $attribName,
  $value 
)

Checks if the given value(s) exist in the attribute.

Parameters
string$attribName
mixed | array$value
Returns
boolean
count ( )

Returns the number of attributes in node.

Implements Countable

Returns
int
existsAttribute (   $name,
  $emptyExists = false 
)

Checks whether a given attribute exists.

If $emptyExists is false empty attributes (containing only array()) are treated as non-existent returning false. If $emptyExists is true empty attributes are treated as existent returning true. In this case method returns false only if the attribute name is missing in the key-collection.

Parameters
string$name
boolean$emptyExists
Returns
boolean
getAttribute (   $name,
  $index = null 
)

Gets a LDAP attribute.

This is an offline method.

Parameters
string$name
integer$index
Returns
mixed
Exceptions
Zend_Ldap_Exception
getAttributes (   $includeSystemAttributes = true)

Gets all attributes of node.

The collection contains all attributes.

This is an offline method.

Parameters
boolean$includeSystemAttributes
Returns
array
getData (   $includeSystemAttributes = true)

Gets node attributes.

The array contains all attributes in its internal format (no conversion).

This is an offline method.

Parameters
boolean$includeSystemAttributes
Returns
array
getDateTimeAttribute (   $name,
  $index = null 
)

Gets a LDAP date/time attribute.

This is an offline method.

Parameters
string$name
integer$index
Returns
array|integer
Exceptions
Zend_Ldap_Exception
getDn ( )

Gets the 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
Zend_Ldap_Dn
getDnArray (   $caseFold = null)

Gets the DN of the current node as an array.

This is an offline method.

Parameters
string$caseFold
Returns
array
getDnString (   $caseFold = null)

Gets the DN of the current node as a string.

This is an offline method.

Parameters
string$caseFold
Returns
string
getObjectClass ( )

Gets the objectClass of the node.

Returns
array
getRdnArray (   $caseFold = null)

Gets the RDN of the current node as an array.

This is an offline method.

Parameters
string$caseFold
Returns
array
getRdnString (   $caseFold = null)

Gets the RDN of the current node as a string.

This is an offline method.

Parameters
string$caseFold
Returns
string
offsetExists (   $name)

Checks whether a given attribute exists.

Implements ArrayAccess.

Empty attributes will be treated as non-existent.

Parameters
string$name
Returns
boolean
offsetGet (   $name)

Gets a LDAP attribute.

Implements ArrayAccess.

This is an offline method.

Parameters
string$name
Returns
array
Exceptions
Zend_Ldap_Exception
offsetSet (   $name,
  $value 
)

Sets a LDAP attribute.

Implements ArrayAccess.

This is an offline method.

Parameters
string$name
mixed$value
Returns
null
Exceptions
BadMethodCallException
offsetUnset (   $name)

Deletes a LDAP attribute.

Implements ArrayAccess.

This method deletes the attribute.

This is an offline method.

Parameters
string$name
Returns
null
Exceptions
BadMethodCallException
reload ( Zend_Ldap  $ldap = null)

Reload node attributes from LDAP.

This is an online method.

Parameters
Zend_Ldap$ldap
Returns
Zend_Ldap_Node_Abstract Provides a fluid interface
Exceptions
Zend_Ldap_Exception
toArray (   $includeSystemAttributes = true)

Returns an array representation of the current node.

Parameters
boolean$includeSystemAttributes
Returns
array
toJson (   $includeSystemAttributes = true)

Returns a JSON representation of the current node.

Parameters
boolean$includeSystemAttributes
Returns
string
toString ( )

Returns the DN of the current node.

{

See Also
getDnString()}
Returns
string

Member Data Documentation

$_currentData
protected
$_dn
protected
$_systemAttributes
staticprotected
Initial value:
=array('createtimestamp', 'creatorsname',
'entrycsn', 'entrydn', 'entryuuid', 'hassubordinates', 'modifiersname',
'modifytimestamp', 'structuralobjectclass', 'subschemasubentry',
'distinguishedname', 'instancetype', 'name', 'objectcategory', 'objectguid',
'usnchanged', 'usncreated', 'whenchanged', 'whencreated')