Doctrine 1.2.4
Doctrine_Node_Interface Interface Reference

Inherited by Doctrine_Node_AdjacencyList, and Doctrine_Node_MaterializedPath.

Public Member Functions

 addChild (Doctrine_Record $record)
 
 delete ()
 
 getAncestors ()
 
 getChildren ()
 
 getDescendants ()
 
 getFirstChild ()
 
 getLastChild ()
 
 getLevel ()
 
 getNextSibling ()
 
 getNumberChildren ()
 
 getNumberDescendants ()
 
 getParent ()
 
 getPath ($seperator= ' > ', $includeNode=false)
 
 getPrevSibling ()
 
 getSiblings ($includeNode=false)
 
 hasChildren ()
 
 hasNextSibling ()
 
 hasParent ()
 
 hasPrevSibling ()
 
 insertAsFirstChildOf (Doctrine_Record $dest)
 
 insertAsLastChildOf (Doctrine_Record $dest)
 
 insertAsNextSiblingOf (Doctrine_Record $dest)
 
 insertAsParentOf (Doctrine_Record $dest)
 
 insertAsPrevSiblingOf (Doctrine_Record $dest)
 
 isDescendantOf (Doctrine_Record $subj)
 
 isDescendantOfOrEqualTo (Doctrine_Record $subj)
 
 isEqualTo (Doctrine_Record $subj)
 
 isLeaf ()
 
 isRoot ()
 
 isValidNode ()
 
 moveAsFirstChildOf (Doctrine_Record $dest)
 
 moveAsLastChildOf (Doctrine_Record $dest)
 
 moveAsNextSiblingOf (Doctrine_Record $dest)
 
 moveAsPrevSiblingOf (Doctrine_Record $dest)
 

Detailed Description

Definition at line 33 of file Interface.php.

Member Function Documentation

Doctrine_Node_Interface::addChild ( Doctrine_Record  $record)

adds node as last child of record

Doctrine_Node_Interface::delete ( )

deletes node and it's descendants

Doctrine_Node_Interface::getAncestors ( )

gets ancestors for node

Returns
Doctrine_Collection
Doctrine_Node_Interface::getChildren ( )

gets children for node (direct descendants only)

Returns
array array of sibling Doctrine_Record objects
Doctrine_Node_Interface::getDescendants ( )

gets descendants for node (direct descendants only)

Returns
Iterator iterator to traverse descendants from node
Doctrine_Node_Interface::getFirstChild ( )

gets record of first child or empty record

Returns
Doctrine_Record
Doctrine_Node_Interface::getLastChild ( )

gets record of last child or empty record

Returns
Doctrine_Record
Doctrine_Node_Interface::getLevel ( )

gets level (depth) of node in the tree

Returns
int
Doctrine_Node_Interface::getNextSibling ( )

gets record of next sibling or empty record

Returns
Doctrine_Record
Doctrine_Node_Interface::getNumberChildren ( )

gets number of children (direct descendants)

Returns
int
Doctrine_Node_Interface::getNumberDescendants ( )

gets number of descendants (children and their children)

Returns
int
Doctrine_Node_Interface::getParent ( )

gets record of parent or empty record

Returns
Doctrine_Record
Doctrine_Node_Interface::getPath (   $seperator = ',
,
  $includeNode = false 
)

gets path to node from root, uses record::toString() method to get node names

Parameters
string$seperatorpath seperator
bool$includeNodewhether or not to include node at end of path
Returns
string string representation of path
Doctrine_Node_Interface::getPrevSibling ( )

gets record of prev sibling or empty record

Returns
Doctrine_Record
Doctrine_Node_Interface::getSiblings (   $includeNode = false)

gets siblings for node

Returns
array array of sibling Doctrine_Record objects
Doctrine_Node_Interface::hasChildren ( )

test if node has children

Returns
bool
Doctrine_Node_Interface::hasNextSibling ( )

test if node has next sibling

Returns
bool
Doctrine_Node_Interface::hasParent ( )

test if node has parent

Returns
bool
Doctrine_Node_Interface::hasPrevSibling ( )

test if node has previous sibling

Returns
bool
Doctrine_Node_Interface::insertAsFirstChildOf ( Doctrine_Record  $dest)

inserts node as first child of dest record

Returns
bool
Doctrine_Node_Interface::insertAsLastChildOf ( Doctrine_Record  $dest)

inserts node as first child of dest record

Returns
bool
Doctrine_Node_Interface::insertAsNextSiblingOf ( Doctrine_Record  $dest)

inserts node as next sibling of dest record

Returns
bool
Doctrine_Node_Interface::insertAsParentOf ( Doctrine_Record  $dest)

inserts node as parent of dest record

Returns
bool
Doctrine_Node_Interface::insertAsPrevSiblingOf ( Doctrine_Record  $dest)

inserts node as previous sibling of dest record

Returns
bool
Doctrine_Node_Interface::isDescendantOf ( Doctrine_Record  $subj)

determines if node is child of subject node

Returns
bool
Doctrine_Node_Interface::isDescendantOfOrEqualTo ( Doctrine_Record  $subj)

determines if node is child of or sibling to subject node

Returns
bool
Doctrine_Node_Interface::isEqualTo ( Doctrine_Record  $subj)

determines if node is equal to subject node

Returns
bool
Doctrine_Node_Interface::isLeaf ( )

determines if node is leaf

Returns
bool
Doctrine_Node_Interface::isRoot ( )

determines if node is root

Returns
bool
Doctrine_Node_Interface::isValidNode ( )

determines if node is valid

Returns
bool
Doctrine_Node_Interface::moveAsFirstChildOf ( Doctrine_Record  $dest)

moves node as first child of dest record

Doctrine_Node_Interface::moveAsLastChildOf ( Doctrine_Record  $dest)

moves node as last child of dest record

Doctrine_Node_Interface::moveAsNextSiblingOf ( Doctrine_Record  $dest)

moves node as next sibling of dest record

Doctrine_Node_Interface::moveAsPrevSiblingOf ( Doctrine_Record  $dest)

moves node as prev sibling of dest record


The documentation for this interface was generated from the following file: