Tree
[ class tree: Tree ] [ index: Tree ] [ all elements ]

Class: Tree_Memory_MDB2nested

Source Location: /Tree-0.3.7/Tree/Memory/MDB2nested.php

Class Overview

Tree_Common
   |
   --Tree_OptionsMDB2
      |
      --Tree_Dynamic_MDB2nested
         |
         --Tree_Memory_MDB2nested



Author(s):

Version:

  • 2001/06/27

Methods


Inherited Variables

Inherited Methods

Class: Tree_Dynamic_MDB2nested

Tree_Dynamic_MDB2nested::Tree_Dynamic_MDB2nested()
Tree_Dynamic_MDB2nested::__construct()
Tree_Dynamic_MDB2nested::add()
add a new element to the tree
Tree_Dynamic_MDB2nested::copy()
copy a subtree/node/... under a new parent or/and behind a given element
Tree_Dynamic_MDB2nested::getChild()
Tree_Dynamic_MDB2nested::getChildren()
get the children of the given element or if the parameter is an array.
Tree_Dynamic_MDB2nested::getDepth()
return the maximum depth of the tree
Tree_Dynamic_MDB2nested::getElement()
Tree_Dynamic_MDB2nested::getFirstRoot()
Tree_Dynamic_MDB2nested::getIdByPath()
return the id of the element which is referenced by $path
Tree_Dynamic_MDB2nested::getLeft()
gets the element to the left, the left visit
Tree_Dynamic_MDB2nested::getLevel()
Tree_Dynamic_MDB2nested::getNext()
get the next element on the same level if there is none return false
Tree_Dynamic_MDB2nested::getNode()
gets the tree under the given element in one array, sorted so you can go through the elements from begin to end and list them as they are in the tree, where every child (until the deepest) is retreived
Tree_Dynamic_MDB2nested::getParent()
get the parent of the element with the given id
Tree_Dynamic_MDB2nested::getPath()
gets the path from the element with the given id down to the root. The returned array is sorted to start at root for simply walking through and retreiving the path
Tree_Dynamic_MDB2nested::getPrevious()
get the previous element on the same level if there is none return false
Tree_Dynamic_MDB2nested::getRight()
gets the element to the right, the right visit
Tree_Dynamic_MDB2nested::getRoot()
get the root
Tree_Dynamic_MDB2nested::hasChildren()
Tells if the node with the given ID has children.
Tree_Dynamic_MDB2nested::isChildOf()
returns if $childId is a child of $id
Tree_Dynamic_MDB2nested::move()
move an entry under a given parent or behind a given entry.
Tree_Dynamic_MDB2nested::remove()
remove a tree element this automatically remove all children and their children if a node shall be removed that has children
Tree_Dynamic_MDB2nested::update()
update the tree element given by $id with the values in $newValues
Tree_Dynamic_MDB2nested::_move()
this method moves one tree element

Class: Tree_OptionsMDB2

Tree_OptionsMDB2::Tree_OptionsMDB2()
this constructor sets the options, since i normally need this and in case the constructor doesnt need to do anymore i already have it done :-)

Class: Tree_Common

Tree_Common::getAllChildren()
gets all the children and grand children etc.
Tree_Common::getAllChildrenIds()
gets all the children-ids and grand children-ids
Tree_Common::getChildId()
Tree_Common::getChildrenIds()
get the ids of the children of the given element
Tree_Common::getDepth()
return the maximum depth of the tree
Tree_Common::getFirstRootId()
Tree_Common::getIdByPath()
Tree_Common::getLeftId()
Tree_Common::getLevel()
get the level, which is how far below the root the element with the given id is
Tree_Common::getNextId()
Tree_Common::getOption()
Tree_Common::getOptions()
returns all the options
Tree_Common::getParentId()
get the id of the parent for the given element
Tree_Common::getParents()
this gets all the preceeding nodes, the parent and it's parent and so on
Tree_Common::getParentsIds()
get the ids of the parents and all it's parents and so on it simply returns the ids of the elements returned by getParents()
Tree_Common::getPath()
gets the path to the element given by its id
Tree_Common::getPathAsString()
returns the path as a string
Tree_Common::getPreviousId()
Tree_Common::getRightId()
Tree_Common::getRootId()
Tree_Common::hasChildren()
returns if the given element has any children
Tree_Common::isChildOf()
returns if $childId is a child of $id
Tree_Common::setOption()
Tree_Common::setOptions()
set a number of options which are simply given in an array
Tree_Common::Tree_Options()
this constructor sets the options, since i normally need this and in case the constructor doesnt need to do anymore i already have it done :-)
Tree_Common::_getAllChildren()
this method gets all the children recursively

Class Details

[line 30]
  • Author:
  • Version: 2001/06/27
  • Access: public


[ Top ]


Method Detail

setup   [line 44]

array setup( [array $res = null])

retreive all the data from the db and prepare the data so the structure can be built in the parent class
  • Return: the result
  • Author: Wolfram Kriesing <wolfram@kriesing.de>
  • Version: 2002/04/20
  • Access: public

Parameters:

array   $res     the result of a query which retreives (all) the tree data from a DB

[ Top ]


Documentation generated on Wed, 04 Jan 2012 03:00:21 +0000 by phpDocumentor 1.4.3. PEAR Logo Copyright © PHP Group 2004.