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

Class: Tree_Memory_MDBnested

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

Class Overview

Tree_Common
   |
   --Tree_OptionsMDB
      |
      --Tree_Dynamic_MDBnested
         |
         --Tree_Memory_MDBnested



Author(s):

Version:

  • 2001/06/27

Methods


Inherited Variables

Inherited Methods

Class: Tree_Dynamic_MDBnested

Tree_Dynamic_MDBnested::Tree_Dynamic_MDBnested()
Tree_Dynamic_MDBnested::__construct()
Tree_Dynamic_MDBnested::add()
add a new element to the tree
Tree_Dynamic_MDBnested::copy()
copy a subtree/node/... under a new parent or/and behind a given element
Tree_Dynamic_MDBnested::getChild()
Tree_Dynamic_MDBnested::getChildren()
get the children of the given element or if the parameter is an array.
Tree_Dynamic_MDBnested::getDepth()
return the maximum depth of the tree
Tree_Dynamic_MDBnested::getElement()
Tree_Dynamic_MDBnested::getFirstRoot()
Tree_Dynamic_MDBnested::getIdByPath()
return the id of the element which is referenced by $path
Tree_Dynamic_MDBnested::getLeft()
gets the element to the left, the left visit
Tree_Dynamic_MDBnested::getLevel()
Tree_Dynamic_MDBnested::getNext()
get the next element on the same level if there is none return false
Tree_Dynamic_MDBnested::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_MDBnested::getParent()
get the parent of the element with the given id
Tree_Dynamic_MDBnested::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_MDBnested::getPrevious()
get the previous element on the same level if there is none return false
Tree_Dynamic_MDBnested::getRight()
gets the element to the right, the right visit
Tree_Dynamic_MDBnested::getRoot()
get the root
Tree_Dynamic_MDBnested::hasChildren()
Tells if the node with the given ID has children.
Tree_Dynamic_MDBnested::isChildOf()
returns if $childId is a child of $id
Tree_Dynamic_MDBnested::move()
move an entry under a given parent or behind a given entry.
Tree_Dynamic_MDBnested::remove()
remove a tree element this automatically remove all children and their children if a node shall be removed that has children
Tree_Dynamic_MDBnested::update()
update the tree element given by $id with the values in $newValues
Tree_Dynamic_MDBnested::_move()
this method moves one tree element

Class: Tree_OptionsMDB

Tree_OptionsMDB::Tree_OptionsMDB()
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 Mon, 11 Mar 2019 15:47:06 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.