Interface: Doctrine_Node_Interface

Source Location: /Doctrine/Node/Interface.php

Interface Doctrine_Node_Interface

Interface Overview
Method Summary
void   addChild()   adds node as last child of record
void   delete()   deletes node and it's descendants
object Doctrine_Collection   getAncestors()   gets ancestors for node
array   getChildren()   gets children for node (direct descendants only)
iterator   getDescendants()   gets descendants for node (direct descendants only)
object Doctrine_Record   getFirstChild()   gets record of first child or empty record
object Doctrine_Record   getLastChild()   gets record of last child or empty record
int   getLevel()   gets level (depth) of node in the tree
object Doctrine_Record   getNextSibling()   gets record of next sibling or empty record
int   getNumberChildren()   gets number of children (direct descendants)
int   getNumberDescendants()   gets number of descendants (children and their children)
object Doctrine_Record   getParent()   gets record of parent or empty record
string   getPath()   gets path to node from root, uses record::toString() method to get node names
object Doctrine_Record   getPrevSibling()   gets record of prev sibling or empty record
array   getSiblings()   gets siblings for node
bool   hasChildren()   test if node has children
bool   hasNextSibling()   test if node has next sibling
bool   hasParent()   test if node has parent
bool   hasPrevSibling()   test if node has previous sibling
bool   insertAsFirstChildOf()   inserts node as first child of dest record
bool   insertAsLastChildOf()   inserts node as first child of dest record
bool   insertAsNextSiblingOf()   inserts node as next sibling of dest record
bool   insertAsParentOf()   inserts node as parent of dest record
bool   insertAsPrevSiblingOf()   inserts node as previous sibling of dest record
bool   isDescendantOf()   determines if node is child of subject node
bool   isDescendantOfOrEqualTo()   determines if node is child of or sibling to subject node
bool   isEqualTo()   determines if node is equal to subject node
bool   isLeaf()   determines if node is leaf
bool   isRoot()   determines if node is root
bool   isValidNode()   determines if node is valid
void   moveAsFirstChildOf()   moves node as first child of dest record
void   moveAsLastChildOf()   moves node as last child of dest record
void   moveAsNextSiblingOf()   moves node as next sibling of dest record
void   moveAsPrevSiblingOf()   moves node as prev sibling of dest record

[ Top ]
Methods
addChild  [line 218]

  void addChild( Doctrine_Record $record  )

adds node as last child of record

Parameters:
Doctrine_Record   $record: 

API Tags:
Access:  public


[ Top ]
delete  [line 266]

  void delete( )

deletes node and it's descendants


API Tags:
Access:  public


[ Top ]
getAncestors  [line 123]

  object Doctrine_Collection getAncestors( )

gets ancestors for node


API Tags:
Access:  public


[ Top ]
getChildren  [line 102]

  array getChildren( )

gets children for node (direct descendants only)


API Tags:
Return:  array of sibling Doctrine_Record objects
Access:  public


[ Top ]
getDescendants  [line 109]

  iterator getDescendants( )

gets descendants for node (direct descendants only)


API Tags:
Return:  iterator to traverse descendants from node
Access:  public


[ Top ]
getFirstChild  [line 88]

  object Doctrine_Record getFirstChild( )

gets record of first child or empty record


API Tags:
Access:  public


[ Top ]
getLastChild  [line 95]

  object Doctrine_Record getLastChild( )

gets record of last child or empty record


API Tags:
Access:  public


[ Top ]
getLevel  [line 139]

  int getLevel( )

gets level (depth) of node in the tree


API Tags:
Access:  public


[ Top ]
getNextSibling  [line 74]

  object Doctrine_Record getNextSibling( )

gets record of next sibling or empty record


API Tags:
Access:  public


[ Top ]
getNumberChildren  [line 146]

  int getNumberChildren( )

gets number of children (direct descendants)


API Tags:
Access:  public


[ Top ]
getNumberDescendants  [line 153]

  int getNumberDescendants( )

gets number of descendants (children and their children)


API Tags:
Access:  public


[ Top ]
getParent  [line 116]

  object Doctrine_Record getParent( )

gets record of parent or empty record


API Tags:
Access:  public


[ Top ]
getPath  [line 132]

  string getPath( [string $seperator = ' > '], [bool $includeNode = false]  )

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

Parameters:
string   $seperator:  path seperator
bool   $includeNode:  whether or not to include node at end of path

API Tags:
Return:  string representation of path
Access:  public


[ Top ]
getPrevSibling  [line 67]

  object Doctrine_Record getPrevSibling( )

gets record of prev sibling or empty record


API Tags:
Access:  public


[ Top ]
getSiblings  [line 81]

  array getSiblings( [ $includeNode = false]  )

gets siblings for node

Parameters:
   $includeNode: 

API Tags:
Return:  array of sibling Doctrine_Record objects
Access:  public


[ Top ]
hasChildren  [line 53]

  bool hasChildren( )

test if node has children


API Tags:
Access:  public


[ Top ]
hasNextSibling  [line 46]

  bool hasNextSibling( )

test if node has next sibling


API Tags:
Access:  public


[ Top ]
hasParent  [line 60]

  bool hasParent( )

test if node has parent


API Tags:
Access:  public


[ Top ]
hasPrevSibling  [line 39]

  bool hasPrevSibling( )

test if node has previous sibling


API Tags:
Access:  public


[ Top ]
insertAsFirstChildOf  [line 181]

  bool insertAsFirstChildOf( Doctrine_Record $dest  )

inserts node as first child of dest record

Parameters:
Doctrine_Record   $dest: 

API Tags:
Access:  public


[ Top ]
insertAsLastChildOf  [line 188]

  bool insertAsLastChildOf( Doctrine_Record $dest  )

inserts node as first child of dest record

Parameters:
Doctrine_Record   $dest: 

API Tags:
Access:  public


[ Top ]
insertAsNextSiblingOf  [line 174]

  bool insertAsNextSiblingOf( Doctrine_Record $dest  )

inserts node as next sibling of dest record

Parameters:
Doctrine_Record   $dest: 

API Tags:
Access:  public


[ Top ]
insertAsParentOf  [line 160]

  bool insertAsParentOf( Doctrine_Record $dest  )

inserts node as parent of dest record

Parameters:
Doctrine_Record   $dest: 

API Tags:
Access:  public


[ Top ]
insertAsPrevSiblingOf  [line 167]

  bool insertAsPrevSiblingOf( Doctrine_Record $dest  )

inserts node as previous sibling of dest record

Parameters:
Doctrine_Record   $dest: 

API Tags:
Access:  public


[ Top ]
isDescendantOf  [line 246]

  bool isDescendantOf( Doctrine_Record $subj  )

determines if node is child of subject node

Parameters:
Doctrine_Record   $subj: 

API Tags:
Access:  public


[ Top ]
isDescendantOfOrEqualTo  [line 253]

  bool isDescendantOfOrEqualTo( Doctrine_Record $subj  )

determines if node is child of or sibling to subject node

Parameters:
Doctrine_Record   $subj: 

API Tags:
Access:  public


[ Top ]
isEqualTo  [line 239]

  bool isEqualTo( Doctrine_Record $subj  )

determines if node is equal to subject node

Parameters:
Doctrine_Record   $subj: 

API Tags:
Access:  public


[ Top ]
isLeaf  [line 225]

  bool isLeaf( )

determines if node is leaf


API Tags:
Access:  public


[ Top ]
isRoot  [line 232]

  bool isRoot( )

determines if node is root


API Tags:
Access:  public


[ Top ]
isValidNode  [line 260]

  bool isValidNode( )

determines if node is valid


API Tags:
Access:  public


[ Top ]
moveAsFirstChildOf  [line 206]

  void moveAsFirstChildOf( Doctrine_Record $dest  )

moves node as first child of dest record

Parameters:
Doctrine_Record   $dest: 

API Tags:
Access:  public


[ Top ]
moveAsLastChildOf  [line 212]

  void moveAsLastChildOf( Doctrine_Record $dest  )

moves node as last child of dest record

Parameters:
Doctrine_Record   $dest: 

API Tags:
Access:  public


[ Top ]
moveAsNextSiblingOf  [line 200]

  void moveAsNextSiblingOf( Doctrine_Record $dest  )

moves node as next sibling of dest record

Parameters:
Doctrine_Record   $dest: 

API Tags:
Access:  public


[ Top ]
moveAsPrevSiblingOf  [line 194]

  void moveAsPrevSiblingOf( Doctrine_Record $dest  )

moves node as prev sibling of dest record

Parameters:
Doctrine_Record   $dest: 

API Tags:
Access:  public


[ Top ]