phpLDAPadmin

# Class: Tree

Source Location: /templates/3rdParty/pla/lib/Tree.php

### Class Overview

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

#### Author(s):

### Variables

- $entries

### Methods

- __construct
- addEntry
- delEntry
- draw
- getBaseEntries
- getEntry
- getInstance
- getServer
- getServerID
- readChildren
- readChildrenNumber
- renameEntry

### Child classes:

HTMLTree
  This class implements a straight HTML tree - no AJAX rendering is used.

### Class Details

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

#### Tags:

see: | HTMLTree AJAXTree
abstract: |

[ Top ]

### Class Variables

#### $entries = array()

[line 21]

#### Tags:

access: | protected

Type: | mixed

[ Top ]

### Class Methods

### static method getInstance [line 41]

`static object Tree getInstance( $server_id)`

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

#### Tags:

access: | public

#### Parameters:

| $server_id |

[ Top ]

### constructor __construct [line 28]

`Tree __construct( $server_id)`

#### Tags:

access: | protected

#### Parameters:

| $server_id |

[ Top ]

### method addEntry [line 164]

`void addEntry( dn $dn)`

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

#### Tags:

access: | public

#### Parameters:

dn | $dn | DN to add

[ Top ]

### method delEntry [line 221]

`void delEntry( dn $dn)`

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

#### Tags:

access: | public

#### Parameters:

dn | $dn | DN to remote

[ Top ]

### method draw [line 26]

`void draw( )`

Displays the LDAP tree

#### Tags:

abstract: |
access: | public

Overridden in child classes as:

HTMLTree::draw()
  Displays the tree in HTML

[ Top ]

### method getBaseEntries [line 102]

`array getBaseEntries( )`

Get the entries that are BaseDN entries.

#### Tags:

return: | Base DN entries
access: | public

[ Top ]

### method getEntry [line 145]

`object Tree getEntry( dn $dn)`

Get a tree entry

#### Tags:

return: | DN object
access: | public

#### Parameters:

dn | $dn | DN to retrieve

[ Top ]

### method getServer [line 90]

`object Server getServer( )`

Get the server Object for this tree

#### Tags:

return: | Object for this tree
access: | protected

[ Top ]

### method getServerID [line 78]

`int getServerID( )`

Get the Server ID for this tree

#### Tags:

return: | Server ID that this tree is for
access: | protected

[ Top ]

### method readChildren [line 277]

`void readChildren( dn $dn, [boolean $nolimit = false])`

Read the children of a tree entry

#### Tags:

access: | public

#### Parameters:

dn | $dn | DN of the entry
boolean | $nolimit | LDAP Size Limit

[ Top ]

### method readChildrenNumber [line 331]

`void readChildrenNumber( dn $dn, [boolean $nolimit = false])`

Return the number of children an entry has. Optionally autoread the child entry.

#### Tags:

access: | protected

#### Parameters:

dn | $dn | DN of the entry
boolean | $nolimit | LDAP Size Limit

[ Top ]

### method renameEntry [line 245]

`void renameEntry( dn $dnOLD, dn $dnNEW)`

Rename an entry in the tree

#### Tags:

access: | public

#### Parameters:

dn | $dnOLD | Old DN
dn | $dnNEW | New DN

[ Top ]

Documentation generated on Tue, 22 Nov 2011 16:30:14 +0100 by phpDocumentor 1.4.1