interface Doctrine_Tree_Interface (View source)

Doctrine_Tree_Interface

Methods

createRoot(Doctrine_Record $record = null)

creates root node from given record or from a new record

fetchRoot($root_id = 1)

returns root node

fetchTree($options = array(), $hydrationMode = null)

optimised method to returns iterator for traversal of the entire tree from root

fetchBranch($pk, $options = array(), $hydrationMode = null)

optimised method that returns iterator for traversal of the tree from the given record primary key

Details

createRoot(Doctrine_Record $record = null)

creates root node from given record or from a new record

Parameters

Doctrine_Record $record instance of Doctrine_Record

Doctrine_Record fetchRoot($root_id = 1)

returns root node

Parameters

$root_id

Return Value

Doctrine_Record

Iterator fetchTree($options = array(), $hydrationMode = null)

optimised method to returns iterator for traversal of the entire tree from root

Parameters

$options
$hydrationMode

Return Value

Iterator instance of Doctrine_Node__PreOrderIterator

iterator fetchBranch($pk, $options = array(), $hydrationMode = null)

optimised method that returns iterator for traversal of the tree from the given record primary key

Parameters

$pk
$options
$hydrationMode

Return Value

iterator instance of Doctrine_Node__PreOrderIterator