propel-util
[ class tree: propel-util ] [ index: propel-util ] [ all elements ]

Class: NodePeer

Source Location: /util/NodePeer.php

Interface Overview


This is a utility interface for all generated NodePeer classes in the system.


Author(s):

Version:

  • $Revision: 797 $

Methods



Class Details

[line 29]
This is a utility interface for all generated NodePeer classes in the system.



Tags:

author:  Heltem <heltem@o2php.com> (Propel)
version:  $Revision: 797 $


[ Top ]


Class Methods


static method createRoot [line 36]

static object Inserted createRoot( $node)

Creates the supplied node as the root node.



Tags:

return:  propel object for model
access:  public


Parameters:

object   $node   Propel object for model

[ Top ]

static method deleteDescendants [line 368]

static void deleteDescendants( $node, [PropelPDO $con = null])

Deletes $node and all of its descendants



Tags:

access:  public


Parameters:

object   $node   Propel object for source node
PropelPDO   $con   Connection to use.

[ Top ]

static method deleteNode [line 123]

static boolean deleteNode( $dest, [PropelPDO $con = null])

Delete $dest node



Tags:

return:  Deletion status
access:  public


Parameters:

object   $dest   Propel object node to delete
PropelPDO   $con   Connection to use.

[ Top ]

static method deleteRoot [line 114]

static boolean deleteRoot( [int $scopeId = 1], [PropelPDO $con = null])

Delete root node



Tags:

return:  Deletion status
access:  public


Parameters:

int   $scopeId   Scope id to determine which root node to delete
PropelPDO   $con   Connection to use.

[ Top ]

static method getLevel [line 256]

static int getLevel( $node, [PropelPDO $con = null])

Gets level for the given node



Tags:

return:  Level for the given node
access:  public


Parameters:

object   $node   Propel object for src node
PropelPDO   $con   Connection to use.

[ Top ]

static method getNode [line 377]

static object Propel getNode( int/object $node, [PropelPDO $con = null])

Returns a node given its primary key or the node itself



Tags:

return:  object for model
access:  public


Parameters:

int/object   $node   Primary key/instance of required node
PropelPDO   $con   Connection to use.

[ Top ]

static method getNumberOfChildren [line 265]

static int getNumberOfChildren( $node, [PropelPDO $con = null])

Gets number of direct children for given node



Tags:

return:  Level for the given node
access:  public


Parameters:

object   $node   Propel object for src node
PropelPDO   $con   Connection to use.

[ Top ]

static method getNumberOfDescendants [line 274]

static int getNumberOfDescendants( $node, [PropelPDO $con = null])

Gets number of descendants for given node



Tags:

return:  Level for the given node
access:  public


Parameters:

object   $node   Propel object for src node
PropelPDO   $con   Connection to use.

[ Top ]

static method getPath [line 283]

static array getPath( $node, [PropelPDO $con = null])

Returns path to a specific node as an array, useful to create breadcrumbs



Tags:

return:  Array in order of heirarchy
access:  public


Parameters:

object   $node   Propel object of node to create path to
PropelPDO   $con   Connection to use.

[ Top ]

static method hasChildren [line 360]

static bool hasChildren( $node)

Tests if $node has children



Tags:

access:  public


Parameters:

object   $node   Propel object for node

[ Top ]

static method hasNextSibling [line 352]

static bool hasNextSibling( $node, [PropelPDO $con = null])

Tests if $node has next sibling



Tags:

access:  public


Parameters:

object   $node   Propel object for node
PropelPDO   $con   Connection to use.

[ Top ]

static method hasParent [line 334]

static bool hasParent( $node, [PropelPDO $con = null])

Tests if $node has an ancestor



Tags:

access:  public


Parameters:

object   $node   Propel object for node
PropelPDO   $con   Connection to use.

[ Top ]

static method hasPrevSibling [line 343]

static bool hasPrevSibling( $node, [PropelPDO $con = null])

Tests if $node has prev sibling



Tags:

access:  public


Parameters:

object   $node   Propel object for node
PropelPDO   $con   Connection to use.

[ Top ]

static method insertAsFirstChildOf [line 55]

static void insertAsFirstChildOf( $child, $parent, [PropelPDO $con = null])

Inserts $child as first child of destination node $parent



Tags:

access:  public


Parameters:

object   $child   Propel object for child node
object   $parent   Propel object for parent node
PropelPDO   $con   Connection to use.

[ Top ]

static method insertAsLastChildOf [line 65]

static void insertAsLastChildOf( $child, $parent, [PropelPDO $con = null])

Inserts $child as last child of destination node $parent



Tags:

access:  public


Parameters:

object   $child   Propel object for child node
object   $parent   Propel object for parent node
PropelPDO   $con   Connection to use.

[ Top ]

static method insertAsNextSiblingOf [line 85]

static void insertAsNextSiblingOf( $node, $sibling, [PropelPDO $con = null])

Inserts $sibling as next sibling to destination node $node



Tags:

access:  public


Parameters:

object   $node   Propel object for destination node
object   $sibling   Propel object for source node
PropelPDO   $con   Connection to use.

[ Top ]

static method insertAsParentOf [line 96]

static void insertAsParentOf( $parent, $node, [PropelPDO $con = null])

Inserts $parent as parent of given $node.



Tags:

throws:  Exception When trying to insert node as parent of a root node
access:  public


Parameters:

object   $parent   Propel object for given parent node
object   $node   Propel object for given destination node
PropelPDO   $con   Connection to use.

[ Top ]

static method insertAsPrevSiblingOf [line 75]

static void insertAsPrevSiblingOf( $node, $sibling, [PropelPDO $con = null])

Inserts $sibling as previous sibling to destination node $node



Tags:

access:  public


Parameters:

object   $node   Propel object for destination node
object   $sibling   Propel object for source node
PropelPDO   $con   Connection to use.

[ Top ]

static method insertRoot [line 105]

static void insertRoot( $node, [PropelPDO $con = null])

Inserts $node as root node



Tags:

access:  public


Parameters:

object   $node   Propel object as root node
PropelPDO   $con   Connection to use.

[ Top ]

static method isChildOf [line 316]

static bool isChildOf( $child, $parent)

Tests if $child is a child of $parent



Tags:

access:  public


Parameters:

object   $child   Propel object for node
object   $parent   Propel object for node

[ Top ]

static method isEqualTo [line 325]

static bool isEqualTo( $node1, $node2)

Tests if $node1 is equal to $node2



Tags:

access:  public


Parameters:

object   $node1   Propel object for node
object   $node2   Propel object for node

[ Top ]

static method isLeaf [line 307]

static bool isLeaf( $node)

Tests if node is a leaf



Tags:

access:  public


Parameters:

object   $node   Propel object for src node

[ Top ]

static method isRoot [line 299]

static bool isRoot( $node)

Tests if node is a root



Tags:

access:  public


Parameters:

object   $node   Propel object for src node

[ Top ]

static method isValid [line 291]

static bool isValid( [ $node = null])

Tests if node is valid



Tags:

access:  public


Parameters:

object   $node   Propel object for src node

[ Top ]

static method moveToFirstChildOf [line 133]

static void moveToFirstChildOf( $parent, $child, [PropelPDO $con = null])

Moves $child to be first child of $parent



Tags:

access:  public


Parameters:

object   $parent   Propel object for parent node
object   $child   Propel object for child node
PropelPDO   $con   Connection to use.

[ Top ]

static method moveToLastChildOf [line 143]

static void moveToLastChildOf( $dest, $node, [PropelPDO $con = null])

Moves $node to be last child of $dest



Tags:

access:  public


Parameters:

object   $dest   Propel object for destination node
object   $node   Propel object for source node
PropelPDO   $con   Connection to use.

[ Top ]

static method moveToNextSiblingOf [line 163]

static void moveToNextSiblingOf( $dest, $node, [PropelPDO $con = null])

Moves $node to be next sibling to $dest



Tags:

access:  public


Parameters:

object   $dest   Propel object for destination node
object   $node   Propel object for source node
PropelPDO   $con   Connection to use.

[ Top ]

static method moveToPrevSiblingOf [line 153]

static void moveToPrevSiblingOf( $dest, $node, [PropelPDO $con = null])

Moves $node to be prev sibling to $dest



Tags:

access:  public


Parameters:

object   $dest   Propel object for destination node
object   $node   Propel object for source node
PropelPDO   $con   Connection to use.

[ Top ]

static method retrieveBranch [line 214]

static void retrieveBranch( $node, [PropelPDO $con = null])

Retrieves the entire tree from parent $node



Tags:

access:  public


Parameters:

PropelPDO   $con   Connection to use.
NodeObject   $node  

[ Top ]

static method retrieveChildren [line 222]

static void retrieveChildren( $node, [PropelPDO $con = null])

Gets direct children for the node



Tags:

access:  public


Parameters:

object   $node   Propel object for parent node
PropelPDO   $con   Connection to use.

[ Top ]

static method retrieveDescendants [line 230]

static void retrieveDescendants( $node, [PropelPDO $con = null])

Gets all descendants for the node



Tags:

access:  public


Parameters:

object   $node   Propel object for parent node
PropelPDO   $con   Connection to use.

[ Top ]

static method retrieveFirstChild [line 172]

static mixed retrieveFirstChild( $node, [PropelPDO $con = null])

Gets first child for the given node if it exists



Tags:

return:  Propel object if exists else false
access:  public


Parameters:

object   $node   Propel object for src node
PropelPDO   $con   Connection to use.

[ Top ]

static method retrieveLastChild [line 181]

static mixed retrieveLastChild( $node, [PropelPDO $con = null])

Gets last child for the given node if it exists



Tags:

return:  Propel object if exists else false
access:  public


Parameters:

object   $node   Propel object for src node
PropelPDO   $con   Connection to use.

[ Top ]

static method retrieveNextSibling [line 199]

static mixed retrieveNextSibling( $node, [PropelPDO $con = null])

Gets next sibling for the given node if it exists



Tags:

return:  Propel object if exists else false
access:  public


Parameters:

object   $node   Propel object for src node
PropelPDO   $con   Connection to use.

[ Top ]

static method retrieveParent [line 247]

static mixed retrieveParent( $node, [PropelPDO $con = null])

Gets ancestor for the given node if it exists



Tags:

return:  Propel object if exists else false
access:  public


Parameters:

object   $node   Propel object for src node
PropelPDO   $con   Connection to use.

[ Top ]

static method retrievePrevSibling [line 190]

static mixed retrievePrevSibling( $node, [PropelPDO $con = null])

Gets prev sibling for the given node if it exists



Tags:

return:  Propel object if exists else false
access:  public


Parameters:

object   $node   Propel object for src node
PropelPDO   $con   Connection to use.

[ Top ]

static method retrieveRoot [line 45]

static object Propel retrieveRoot( [int $scopeId = 1], [PropelPDO $con = null])

Returns the root node for a given scope id



Tags:

return:  object for root node
access:  public


Parameters:

int   $scopeId   Scope id to determine which root node to return
PropelPDO   $con   Connection to use.

[ Top ]

static method retrieveSiblings [line 238]

static void retrieveSiblings( $node, [PropelPDO $con = null])

Gets all siblings for the node



Tags:

access:  public


Parameters:

object   $node   Propel object for src node
PropelPDO   $con   Connection to use.

[ Top ]

static method retrieveTree [line 207]

static void retrieveTree( [int $scopeId = 1], [PropelPDO $con = null])

Retrieves the entire tree from root



Tags:

access:  public


Parameters:

int   $scopeId   Scope id to determine which scope tree to return
PropelPDO   $con   Connection to use.

[ Top ]


Documentation generated on Thu, 22 Nov 2007 03:33:47 +0000 by phpDocumentor 1.4.0