Interface: Doctrine_Tree_Interface

Source Location: /Doctrine/Tree/Interface.php

Interface Doctrine_Tree_Interface

Interface Overview

Doctrine_Tree_Interface

Located in /Doctrine/Tree/Interface.php [line 32]



		
				Author(s):
		
		
		
Information Tags:
Version:  $Revision: 1080 $
Link:  www.phpdoctrine.com
Since:  1.0
License:  LGPL

Methods

[ Top ]
Method Summary
void   createRoot()   creates root node from given record or from a new record
iterator   fetchBranch()   optimised method that returns iterator for traversal of the tree from the given record primary key
object   fetchTree()   optimised method to returns iterator for traversal of the entire tree from root
object   findRoot()   returns root node

[ Top ]
Methods
createRoot  [line 39]

  void createRoot( [Doctrine_Record $record = null]  )

creates root node from given record or from a new record

Parameters:
object   $record:  instance of Doctrine_Record

API Tags:
Access:  public


[ Top ]
fetchBranch  [line 63]

  iterator fetchBranch( mixed $pk, [array $options = array()]  )

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

API Tags:
Return:  instance of Doctrine_Node_<Implementation>_PreOrderIterator
Access:  public


[ Top ]
fetchTree  [line 54]

  object fetchTree( [array $options = array()]  )

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

Parameters:
array   $options:  options

API Tags:
Return:  instance of Doctrine_Node_<Implementation>_PreOrderIterator
Access:  public


[ Top ]
findRoot  [line 46]

  object findRoot( [ $root_id = 1]  )

returns root node

Parameters:
   $root_id: 

API Tags:
Return:  instance of Doctrine_Record
Access:  public


[ Top ]