Inherits Doctrine_Node, and Doctrine_Node_Interface.
Definition at line 33 of file AdjacencyList.php.
adds node as last child of record
| Doctrine_Node_Interface::delete |
( |
| ) |
|
|
inherited |
deletes node and it's descendants
| static Doctrine_Node::factory |
( |
Doctrine_Record |
$record, |
|
|
|
$implName, |
|
|
|
$options = array() |
|
) |
| |
|
staticinherited |
Factory method for creating a Node.
This is a factory method that returns node instance based upon chosen implementation.
- Parameters
-
| object | $record | instance of Doctrine_Record |
| string | $implName | implementation (NestedSet, AdjacencyList, MaterializedPath) |
| array | $options | options |
- Returns
- Doctrine_Node
- Exceptions
-
Definition at line 115 of file Node.php.
{
$class = 'Doctrine_Node_' . $implName;
if ( ! class_exists($class)) {
}
}
| Doctrine_Node_Interface::getAncestors |
( |
| ) |
|
|
inherited |
| Doctrine_Node_Interface::getChildren |
( |
| ) |
|
|
inherited |
gets children for node (direct descendants only)
- Returns
- array array of sibling Doctrine_Record objects
| Doctrine_Node_Interface::getDescendants |
( |
| ) |
|
|
inherited |
gets descendants for node (direct descendants only)
- Returns
- Iterator iterator to traverse descendants from node
| Doctrine_Node_Interface::getFirstChild |
( |
| ) |
|
|
inherited |
| Doctrine_Node::getIterator |
( |
|
$type = null, |
|
|
|
$options = null |
|
) |
| |
|
inherited |
get iterator
- Parameters
-
| string | $type | type of iterator (Pre | Post | Level) |
| array | $options | options |
Definition at line 163 of file Node.php.
{
if ($type === null) {
$type = (isset($this->iteratorType) ? $this->iteratorType : 'Pre');
}
$options = (isset($this->iteratorOptions) ? $this->iteratorOptions : array());
}
$implName = $this->record->getTable()->getOption('treeImpl');
$iteratorClass = 'Doctrine_Node_' . $implName . '_' . ucfirst(strtolower($type)) . 'OrderIterator';
return new $iteratorClass($this->record,
$options);
}
| Doctrine_Node_Interface::getLastChild |
( |
| ) |
|
|
inherited |
| Doctrine_Node_Interface::getLevel |
( |
| ) |
|
|
inherited |
gets level (depth) of node in the tree
- Returns
- int
| Doctrine_Node_Interface::getNextSibling |
( |
| ) |
|
|
inherited |
| Doctrine_Node_Interface::getNumberChildren |
( |
| ) |
|
|
inherited |
gets number of children (direct descendants)
- Returns
- int
| Doctrine_Node_Interface::getNumberDescendants |
( |
| ) |
|
|
inherited |
gets number of descendants (children and their children)
- Returns
- int
| Doctrine_Node_Interface::getParent |
( |
| ) |
|
|
inherited |
| Doctrine_Node_Interface::getPath |
( |
|
$seperator = ', |
|
|
' |
, |
|
|
|
$includeNode = false |
|
) |
| |
|
inherited |
gets path to node from root, uses record::toString() method to get node names
- Parameters
-
| string | $seperator | path seperator |
| bool | $includeNode | whether or not to include node at end of path |
- Returns
- string string representation of path
| Doctrine_Node_Interface::getPrevSibling |
( |
| ) |
|
|
inherited |
| Doctrine_Node::getRecord |
( |
| ) |
|
|
inherited |
| Doctrine_Node_Interface::getSiblings |
( |
|
$includeNode = false | ) |
|
|
inherited |
gets siblings for node
- Returns
- array array of sibling Doctrine_Record objects
| Doctrine_Node_Interface::hasChildren |
( |
| ) |
|
|
inherited |
test if node has children
- Returns
- bool
| Doctrine_Node_Interface::hasNextSibling |
( |
| ) |
|
|
inherited |
test if node has next sibling
- Returns
- bool
| Doctrine_Node_Interface::hasParent |
( |
| ) |
|
|
inherited |
test if node has parent
- Returns
- bool
| Doctrine_Node_Interface::hasPrevSibling |
( |
| ) |
|
|
inherited |
test if node has previous sibling
- Returns
- bool
inserts node as first child of dest record
- Returns
- bool
inserts node as first child of dest record
- Returns
- bool
inserts node as next sibling of dest record
- Returns
- bool
inserts node as parent of dest record
- Returns
- bool
inserts node as previous sibling of dest record
- Returns
- bool
determines if node is child of subject node
- Returns
- bool
determines if node is child of or sibling to subject node
- Returns
- bool
determines if node is equal to subject node
- Returns
- bool
| Doctrine_Node_Interface::isLeaf |
( |
| ) |
|
|
inherited |
determines if node is leaf
- Returns
- bool
| Doctrine_Node_Interface::isRoot |
( |
| ) |
|
|
inherited |
determines if node is root
- Returns
- bool
| Doctrine_Node_Interface::isValidNode |
( |
| ) |
|
|
inherited |
determines if node is valid
- Returns
- bool
moves node as first child of dest record
moves node as last child of dest record
moves node as next sibling of dest record
moves node as prev sibling of dest record
| Doctrine_Node::setIteratorOptions |
( |
|
$options | ) |
|
|
inherited |
sets node's iterator options
- Parameters
-
Definition at line 194 of file Node.php.
| Doctrine_Node::setIteratorType |
( |
|
$type | ) |
|
|
inherited |
sets node's iterator type
- Parameters
-
Definition at line 184 of file Node.php.
{
$this->iteratorType = $type;
}
setter for record attribute
- Parameters
-
Definition at line 131 of file Node.php.
| Doctrine_Node::traverse |
( |
|
$type = 'Pre', |
|
|
|
$options = array() |
|
) |
| |
|
inherited |
convenience function for getIterator
- Parameters
-
| string | $type | type of iterator (Pre | Post | Level) |
| array | $options | options |
Definition at line 152 of file Node.php.
| Doctrine_Node::$iteratorOptions |
|
protectedinherited |
- Parameters
-
Definition at line 53 of file Node.php.
| Doctrine_Node::$iteratorType |
|
protectedinherited |
- Parameters
-
| string | $iteratorType | (Pre | Post | Level) |
Definition at line 48 of file Node.php.
- Parameters
-
Definition at line 43 of file Node.php.
- Parameters
-
Definition at line 38 of file Node.php.
The documentation for this class was generated from the following file: