Abstract class which represents the LDAP tree view ; the draw() method must be implemented by subclasses

package phpLDAPadmin
subpackage Tree
see \global\HTMLTree

 Methods

Add an entry in the tree view ; the entry is added in the children array of its parent

addEntry(\dn | string $dn) 

Parameters

$dn

\dnstring

DN to add

Delete an entry from the tree view ; the entry is deleted from the children array of its parent

delEntry(\dn $dn) 

Parameters

$dn

\dn

DN to remote

Displays the LDAP tree

draw() 

Get the entries that are BaseDN entries.

getBaseEntries() : array

Returns

arrayBase DN entries

Get a tree entry

getEntry(\dn $dn) : object

Parameters

$dn

\dn

DN to retrieve

Returns

objectTree DN object

Create an instance of the tree - this is used when we call this class directly Tree::getInstance($index)

getInstance($server_id) : object

Parameters

$server_id

Returns

objectTree

Read the children of a tree entry

readChildren(\dn $dn, boolean $nolimit) 

Parameters

$dn

\dn

DN of the entry

$nolimit

boolean

LDAP Size Limit

Rename an entry in the tree

renameEntry(\dn $dnOLD, \dn $dnNEW) 

Parameters

$dnOLD

\dn

Old DN

$dnNEW

\dn

New DN

__construct()

__construct($server_id) 

Parameters

$server_id

Get the server Object for this tree

getServer() : object

Returns

objectServer Object for this tree

Get the Server ID for this tree

getServerID() : int

Returns

intServer ID that this tree is for

Return the number of children an entry has.

readChildrenNumber(\dn $dn, boolean $nolimit) 

Optionally autoread the child entry.

Parameters

$dn

\dn

DN of the entry

$nolimit

boolean

LDAP Size Limit

This function will take the DN, convert it to lowercase and strip unnessary commas.

indexDN(\dn $dn) : \dn

This result will be used as the index for the tree object. Any display of a DN should use the object->dn entry, not the index. The reason we need to do this is because: uid=User A,ou=People,c=AU and uid=User B, ou=PeOpLe, c=au are infact in the same branch, but PLA will show them inconsistently.

Parameters

$dn

\dn

DN to clean

Returns

\dnLowercase clean DN

 Properties

 

$entries

$entries 

 

$server_id

$server_id