Introduction (Previous) (Next) Introduction

View this page in Last updated: Sun, 20 Jul 2008
English | French | German | Japanese | Plain HTML

DB_NestedSet

Table des matières
Introduction --  Introduction to DB_NestedSet
DB_NestedSet::addListener() -- Add an event listener
DB_NestedSet::apiVersion() -- apiVersion
DB_NestedSet::convertTreeModel() -- Convert a <1.3 tree into a 1.3 tree format
DB_NestedSet::createLeftNode() -- Creates a node before a given node
DB_NestedSet::createRightNode() -- Creates a node after a given node
DB_NestedSet::createRootNode() --  Creates a new root node. If no id is specified then it is either added to the beginning/end of the tree based on the $pos.
DB_NestedSet::createSubNode() -- Creates a subnode
DB_NestedSet::deleteNode() -- Deletes a node
DB_NestedSet::factory() --  Handles the returning of a concrete instance of DB_NestedSet based on the driver.
DB_NestedSet::getAllNodes() -- Fetch the whole NestedSet
DB_NestedSet::getBranch() -- Fetch the whole branch where a given node id is in
DB_NestedSet::getChildren() -- Fetch the children _one level_ after of a node given by id
DB_NestedSet::getParent() -- Fetch the immediate parent of a node given by id
DB_NestedSet::getParents() -- Fetch the parents of a node given by id
DB_NestedSet::getRootNodes() -- Fetches the first level (the rootnodes) of the NestedSet
DB_NestedSet::getSiblings() --  Fetch all siblings of the node given by id Important: The node given by ID will also be returned Do a unset($array[$id]) on the result if you don't want that
DB_NestedSet::getSubBranch() -- Fetch all the children of a node given by id
DB_NestedSet::isParent() -- See if a given node is a parent of another given node
DB_NestedSet::moveTree() -- Wrapper for node moving and copying
DB_NestedSet::pickNode() -- Fetch the data of a node with the given id
DB_NestedSet::removeListener() -- Removes an event listener
DB_NestedSet::setAttr() -- Sets an object attribute
DB_NestedSet::setDbOption() -- Sets a db option. Example, setting the sequence table format
DB_NestedSet::setsortMode() -- This enables you to set specific options for each output method
DB_NestedSet::testLock() -- Tests if a database lock is set
DB_NestedSet::triggerEvent() -- Triggers and event an calls the event listeners
DB_NestedSet::updateNode() -- Changes the payload of a node

With this package, one can easily create trees with infinite depth inside a relational database.

Introduction (Previous) (Next) Introduction

Download Documentation Last updated: Sun, 20 Jul 2008
Do you think that something on this page is wrong? Please file a bug report or add a note.
User Notes:
Note by: bijay.rungta@gmail.com
Does anyone know How can I check if a given node is a leaf node or not??

I think there must be a method to check if a node is a Leaf Node or not in this type of an Object.

Is there a workaround to check it.

If not I suggest that this method be included in the Class..

Thanks,
Bijay Rungta