Comunitatea PHP Romania
 

 
DB_NestedSet

DB_NestedSet

Table of Contents
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.

Ultimele discutii in forum RSS Forum

Ultimele articole Ultimele articole

Top membri

Pirahna Pirahna
la birou
carco carco
Bucuresti
Birkoff Birkoff
Bucuresti
mihaitha mihaitha
Sibiu
Mascka Mascka
Braila
gabysolomon gabysolomon
Bacau
whooper whooper
Toronto ON
raul_ raul_
dechim dechim
Drobeta Turnu Severin
Amenthes Amenthes

Newsletter


Email:
 inscriere
 renuntare
 
 Arhiva newsletter

Parteneriat

Copyright © 2001-2008 PHP Romania Add PHPRomania to Google Add PHPRomania to Del.icio.us Add PHPRomania to Stumbleupon Add PHPRomania to Yahoo! Add PHPRomania to Digg Add PHPRomania to Blink Insurance | Loans | Debt Consolidation | Mortgages | Credit Card Consolidation
Ads: Partener Way2Web Nework: gazduire web | inregistrare domenii | web design | imobiliare | web hosting
Powered by Simplis