Tree |
[ class tree: Tree ] [ index: Tree ] [ all elements ] |
Packages: Tree Classes:
Tree
Files:Tree_Common Tree_Dynamic_DBnested Tree_Dynamic_MDB2nested Tree_Dynamic_MDBnested Tree_Error Tree_Memory Tree_Memory_Array Tree_Memory_DBnested Tree_Memory_DBsimple Tree_Memory_Filesystem Tree_Memory_MDB2nested Tree_Memory_MDB2simple Tree_Memory_MDBnested Tree_Memory_MDBsimple Tree_Memory_XML Tree_OptionsDB Tree_OptionsMDB Tree_OptionsMDB2
Array.php
Common.php DBnested.php DBnested.php DBsimple.php Dynamic_DBnested.php Dynamic_MDBnested.php Error.php Filesystem.php index.php index.php MDB2nested.php MDB2nested.php MDB2simple.php MDBnested.php MDBnested.php MDBsimple.php Memory.php Memory_DBnested.php Memory_DBsimple.php Memory_MDBnested.php Memory_MDBsimple.php Memory_XML.php OptionsDB.php OptionsMDB.php OptionsMDB2.php Tree.php treeClass.php XML.php |
[ Top ] Method DetailTree_Dynamic_DBnested (Constructor) [line 99]
Parameters:
[ Top ]
__construct (Constructor) [line 82]
Parameters:
[ Top ]
add [line 146]
add a new element to the tree there are three ways to use this method Method 1: Give only the $parentId and the $newValues will be inserted as the first child of this parent Method 2: Give the $prevId ($parentId will be dismissed) and the new element will be inserted in the tree after the element with the ID=$prevId the parentId is not necessary because the prevId defines exactly where the new element has to be place in the tree, and the parent is the same as for the element with the ID=$prevId Method 3: neither $parentId nor prevId is given, then the root element will be inserted. This requires that programmer is responsible to confirm this. This method does not yet check if there is already a root element saved!
Parameters:
[ Top ]
copy [line 621]
copy a subtree/node/... under a new parent or/and behind a given element
Parameters:
[ Top ]
getChild [line 699]
Parameters:
[ Top ]
getChildren [line 895]
get the children of the given element or if the parameter is an array. It gets the children of all the elements given by their ids in the array.
Parameters:
[ Top ]
getDepth [line 1077]
return the maximum depth of the tree
Overrides Tree_Common::getDepth() (return the maximum depth of the tree) [ Top ]
getElement [line 668]
Parameters:
[ Top ]
getFirstRoot [line 1244]getIdByPath [line 1141]
return the id of the element which is referenced by $path this is useful for xml-structures, like: getIdByPath('/root/sub1/sub2') this requires the structure to use each name uniquely if this is not given it will return the first proper path found i.e. there should only be one path /x/y/z experimental: the name can be non unique if same names are in different levels
Overrides Tree_Common::getIdByPath() (parent method not documented) Parameters:
[ Top ]
getLeft [line 793]
gets the element to the left, the left visit
Parameters:
[ Top ]
getLevel [line 769]
Overrides Tree_Common::getLevel() (get the level, which is how far below the root the element with the given id is) Parameters:
[ Top ]
getNext [line 971]
get the next element on the same level if there is none return false
Parameters:
[ Top ]
getNode [line 1267]
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
Parameters:
[ Top ]
getParent [line 855]
get the parent of the element with the given id
Parameters:
[ Top ]
getPath [line 734]
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
Overrides Tree_Common::getPath() (gets the path to the element given by its id) Parameters:
[ Top ]
getPrevious [line 1012]
get the previous element on the same level if there is none return false
Parameters:
[ Top ]
getRight [line 824]
gets the element to the right, the right visit
Parameters:
[ Top ]
getRoot [line 642]
get the root
[ Top ]
hasChildren [line 1113]
Tells if the node with the given ID has children.
Overrides Tree_Common::hasChildren() (returns if the given element has any children) Parameters:
[ Top ]
isChildOf [line 1052]
returns if $childId is a child of $id
Overrides Tree_Common::isChildOf() (returns if $childId is a child of $id) Parameters:
[ Top ]
move [line 404]
move an entry under a given parent or behind a given entry. If a newPrevId is given the newParentId is dismissed! call it either like this: $tree->move(x, y) to move the element (or entire tree) with the id x under the element with the id y or $tree->move(x, 0, y); // ommit the second parameter by setting it to 0 to move the element (or entire tree) with the id x behind the element with the id y or $tree->move(array(x1,x2,x3), ... the first parameter can also be an array of elements that shall be moved. the second and third para can be as described above. If you are using the Memory_DBnested then this method would be invain, since Memory.php already does the looping through multiple elements. But if Dynamic_DBnested is used we need to do the looping here
Parameters:
[ Top ]
remove [line 280]
remove a tree element this automatically remove all children and their children if a node shall be removed that has children
Parameters:
[ Top ]
update [line 582]
update the tree element given by $id with the values in $newValues
Parameters:
[ Top ]
_move [line 439]
this method moves one tree element
Parameters:
[ Top ]
Documentation generated on Mon, 11 Mar 2019 15:47:04 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004. |