Inherits Doctrine_Tree, and Doctrine_Tree_Interface.
Definition at line 33 of file AdjacencyList.php.
creates root node from given record or from a new record
- Parameters
-
| static Doctrine_Tree::factory |
( |
Doctrine_Table |
$table, |
|
|
|
$implName, |
|
|
|
$options = array() |
|
) |
| |
|
staticinherited |
Factory method to create a Tree.
This is a factory method that returns a tree instance based upon chosen implementation.
- Parameters
-
| object | $table | instance of Doctrine_Table |
| string | $impName | implementation (NestedSet, AdjacencyList, MaterializedPath) |
| array | $options | options |
- Returns
- Doctrine_Tree
- Exceptions
-
Definition at line 99 of file Tree.php.
{
$class = 'Doctrine_Tree_' . $implName;
if ( ! class_exists($class)) {
}
}
| Doctrine_Tree_Interface::fetchBranch |
( |
|
$pk, |
|
|
|
$options = array(), |
|
|
|
$hydrationMode = null |
|
) |
| |
|
inherited |
optimised method that returns iterator for traversal of the tree from the given record primary key
- Parameters
-
| mixed | $pk | primary key as used by table::find() to locate node to traverse tree from |
| array | $options | options |
| integer | $fetchmode | One of the Doctrine_Core::HYDRATE_* constants. |
- Returns
- iterator instance of Doctrine_Node_<Implementation>_PreOrderIterator
| Doctrine_Tree_Interface::fetchRoot |
( |
|
$root_id = 1 | ) |
|
|
inherited |
| Doctrine_Tree_Interface::fetchTree |
( |
|
$options = array(), |
|
|
|
$hydrationMode = null |
|
) |
| |
|
inherited |
optimised method to returns iterator for traversal of the entire tree from root
- Parameters
-
| array | $options | options |
| integer | $fetchmode | One of the Doctrine_Core::HYDRATE_* constants. |
- Returns
- Iterator instance of Doctrine_Node_<Implementation>_PreOrderIterator
| Doctrine_Tree::getAttribute |
( |
|
$name | ) |
|
|
inherited |
gets tree attribute value
Definition at line 112 of file Tree.php.
{
return isset($this->options[$name]) ? $this->options[$name] : null;
}
| Doctrine_Tree::getBaseComponent |
( |
| ) |
|
|
inherited |
Returns the base tree component.
Definition at line 130 of file Tree.php.
{
return $this->_baseComponent;
}
| Doctrine_Tree::setAttribute |
( |
|
$name, |
|
|
|
$value |
|
) |
| |
|
inherited |
sets tree attribute value
- Parameters
-
Definition at line 122 of file Tree.php.
{
$this->options[$name] = $value;
}
| Doctrine_Tree::setTableDefinition |
( |
| ) |
|
|
inherited |
Used to define table attributes required for the given implementation
- Exceptions
-
Definition at line 74 of file Tree.php.
this method is used for setting up relations and attributes and should be used by specific implementations
Definition at line 83 of file Tree.php.
| Doctrine_Tree::$options = array() |
|
protectedinherited |
- Parameters
-
Definition at line 43 of file Tree.php.
- Parameters
-
Definition at line 38 of file Tree.php.
The documentation for this class was generated from the following file: