[ Index ] |
|
Code source de Symfony 1.0.0 |
[Code source] [Imprimer] [Statistiques]
Base tree node class for manipulating a tree of <?php echo $table->getPhpName() ?> objects. This class will wrap these objects within a "node" interface. It provides a method overload mechanism which allows you to use a <?php echo $table->getPhpName() ?>Node object just like a <?php $table->getPhpName() ?> object. To avoid tree corruption, you should always use this class to make changes to the tree and objects within it rather than using the <?php echo $table->getPhpName() ?> class directly.
Poids: | 871 lignes (31 kb) |
Inclus ou requis: | 0 fois |
Référencé: | 0 fois |
Nécessite: | 0 fichiers |
setIteratorOptions($type, $opts) X-Ref |
Pas de description |
getNodePath() X-Ref |
Pas de description |
getNodeIndex() X-Ref |
Returns one-based node index among siblings. return: int |
getNodeLevel() X-Ref |
Returns one-based node level within tree (root node is level 1). return: int |
hasChildNode(&$node, $strict = false, $recurse = false) X-Ref |
Returns true if specified node is a child of this node. If recurse is true, checks if specified node is a descendant of this node. param: <?php echo $table->getPhpName() ?>Node Node to look for. param: boolean True if strict comparison should be used. param: boolean True if all descendants should be checked. return: boolean |
isRootNode() X-Ref |
Pas de description |
setNew($b) X-Ref |
Changes the state of the object and its descendants to 'new'. Also changes the node path to '0' to indicate that it is not a stored node. param: boolean return: void |
setDeleted($b) X-Ref |
Changes the state of the object and its descendants to 'deleted'. param: boolean return: void |
addChildNode(&$node, $beforeNode = null, $con = null) X-Ref |
Adds the specified node (and its children) as a child to this node. If a valid $beforeNode is specified, the node will be inserted in front of $beforeNode. If $beforeNode is not specified the node will be appended to the end of the child nodes. param: <?php echo $table->getPhpName() ?>Node Node to add. param: <?php echo $table->getPhpName() ?>Node Node to insert before. param: Connection Connection to use. |
moveChildNode(&$node, $direction, $con = null) X-Ref |
Moves the specified child node in the specified direction. param: <?php $table->getPhpName() ?>Node Node to move. param: int Number of spaces to move among siblings (may be negative). param: Connection Connection to use. |
save($recurse = false, $con = null) X-Ref |
Saves modified object data to the datastore. param: boolean If true, descendants will be saved as well. param: Connection Connection to use. |
delete($con = null) X-Ref |
Removes this object and all descendants from datastore. param: Connection Connection to use. return: void |
equals(&$node, $strict = false) X-Ref |
Compares the object wrapped by this node with that of another node. Use this instead of equality operators to prevent recursive dependency errors. param: <?php echo $table->getPhpName() ?>Node Node to compare. param: boolean True if strict comparison should be used. return: boolean |
attachParentNode(&$node) X-Ref |
This method is used internally when constructing the tree structure from the database. To set the parent of a node, you should call addChildNode() on the parent. param: <?php echo $table->getPhpName() ?>Node Parent node to attach. return: void |
attachChildNode(&$node) X-Ref |
This method is used internally when constructing the tree structure from the database. To add a child to a node you should call the addChildNode() method instead. param: <?php echo $table->getPhpName() ?>Node Child node to attach. return: void |
detachParentNode(&$node) X-Ref |
This method is used internally when deleting nodes. It is used to break the link to this node's parent. param: <?php echo $table->getPhpName() ?>Node Parent node to detach from. return: void |
detachChildNode(&$node) X-Ref |
This method is used internally when deleting nodes. It is used to break the link to this between this node and the specified child. param: <?php echo $table->getPhpName() ?>Node Child node to detach. return: void |
shiftChildNodes($direction, $offsetIdx, &$con) X-Ref |
Shifts child nodes in the specified direction and offset index. This method assumes that there is already space available in the direction/offset indicated. param: int Direction/# spaces to shift. 1=leftshift, 1=rightshift param: int Node index to start shift at. param: Connection The connection to be used. return: void |
insertNewChildNode(&$node, $childIdx, &$con) X-Ref |
Inserts the node and its children at the specified childIdx. param: <?php echo $table->getPhpName() ?>Node Node to insert. param: int One-based child index to insert at. param: Connection Connection to use. param: void |
adjustStatus($status, $b) X-Ref |
Adjust new/deleted status of node and all children. param: string Status to change ('New' or 'Deleted') param: boolean Value for status. return: void |
adjustNodePath($oldBasePath, $newBasePath) X-Ref |
Adjust path of node and all children. This is used internally when inserting/moving nodes. param: string Section of old path to change. param: string New section to replace old path with. return: void |
Généré le : Fri Mar 16 22:42:14 2007 | par Balluche grâce à PHPXref 0.7 |