A class to deal with tree-structured data (such as groups)
Usage: $tree = new PU_tree $tree->add(1, 0); // add a root node $tree->add(2, 1, 'leaf'); // add a named leaf to the root node $tree->climb(); // study the tree YOU HAVE TO DO THAT BEFORE ACTUALLY USING THE TREE
Located in /PHPDS_utils.inc.php (line 586)
Associative array: for each node (by ref), what are the nodes upper in the tree
Associative array: for each node (by ref), what are the nodes lower in the tree
Associative array of the nodes (element ref => element, usually a label)
Add an element to the tree. When all elements are added, you MUST call climb()
Returns the ascendants of the given node, either as array or as a string for sql
Climb the tree in order to fill the descendant array.
Don't call it with parameter
Returns the descendants of the given node, either as array or as a string for sql
Returns an array of nodes, either the whole tree, or only the nodes listed in the filter
Documentation generated on Tue, 09 Aug 2011 09:05:32 +0200 by phpDocumentor 1.4.3