Thetreeinterface,forcreatingandaccessingthetree,isaccessedonatablelevel.Afullimplementationofthisinterfacewouldbeasfollows:<codetype="php">interfaceDoctrine_Tree_Interface{/** * creates root node from given record or from a new record */publicfunctioncreateRoot(Doctrine_Record$record=null);/** * returns root node */publicfunctionfindRoot($root_id=1);/** * optimised method to returns iterator for traversal of the entire tree from root */publicfunctionfetchTree($options=array());/** * optimised method that returns iterator for traversal of the tree from the given record's primary key */publicfunctionfetchBranch($pk,$options=array());}// if your model acts as tree you can retrieve the associated tree object as follows$treeObj=$manager->getTable('Model')->getTree();</code>