soo_txp_obj API Documentation
soo_nested_set Class Reference
Class for Joe Celko nested sets, aka modified preorder tree. More...
Public Member Functions | |
__construct ($init=array(), $table= '', $index=null) | |
Constructor. | |
as_object_array (&$rows=null, $rgt=null) | |
Return all rows as a nested array of row objects. | |
as_array ($index_column, $value_column, &$rows=null, $rgt=null) | |
Return all rows as a nested array of values. | |
subtree ($root, $index=null) | |
Split off a subtree of rows as a new soo_nested_set object. |
Detailed Description
Class for Joe Celko nested sets, aka modified preorder tree.
Definition at line 791 of file soo_txp_obj.php.
Constructor & Destructor Documentation
soo_nested_set::__construct | ( | $ | init = array() , |
|
$ | table = '' , |
|||
$ | index = null | |||
) |
Constructor.
$init can be a soo_txp_rowset object, otherwise see parent::__construct()
- Parameters:
-
init Data array or query object to initialize rowset table Txp table name
Reimplemented from soo_txp_rowset.
Definition at line 799 of file soo_txp_obj.php.
Member Function Documentation
soo_nested_set::as_array | ( | $ | index_column, | |
$ | value_column, | |||
&$ | rows = null , |
|||
$ | rgt = null | |||
) |
Return all rows as a nested array of values.
Each array item is either a node, as $index_column => $value_column, or an array of such. If an array, it is the children of the immediately preceding item, and has the key 'x_c' where 'x' is the parent node's index. This is a recursive function.
- Parameters:
-
index_column Column for node index value index_column Column for node value rows Internal use only. rgt Internal use only.
Definition at line 847 of file soo_txp_obj.php.
soo_nested_set::as_object_array | ( | &$ | rows = null , |
|
$ | rgt = null | |||
) |
Return all rows as a nested array of row objects.
Each array item is either a soo_txp_row object, or an array of such. If an array, it is the children of the immediately preceding item. This is a recursive function.
- Parameters:
-
rows Internal use only. rgt Internal use only.
Definition at line 818 of file soo_txp_obj.php.
soo_nested_set::subtree | ( | $ | root, | |
$ | index = null | |||
) |
Split off a subtree of rows as a new soo_nested_set object.
- Parameters:
-
root id of subtree root node
- Returns:
- soo_txp_rowset
Definition at line 870 of file soo_txp_obj.php.
The documentation for this class was generated from the following file:
Generated on Fri Jan 7 2011 14:35:01 for soo_txp_obj by Doxygen 1.7.1