| [ Index ] |
|
Code source de Horde 3.1.3 |
[Code source] [Imprimer] [Statistiques]
(pas de description)
| Poids: | 365 lignes (12 kb) |
| Inclus ou requis: | 0 fois |
| Référencé: | 0 fois |
| Nécessite: | 0 fichiers |
DataTree_null:: (18 méthodes):
_load()
_loadById()
getSortedTree()
add()
reorder()
setOrder()
remove()
removeByIds()
removeByNames()
move()
rename()
getData()
getAttributes()
countByAttributes()
getByAttributes()
sortByAttributes()
getAttributeValues()
updateData()
Classe: DataTree_null - X-Ref
The DataTree_null:: class provides a dummy implementation of the| _load($root = null, $reload = false) X-Ref |
| Load (a subset of) the datatree into the $_data array. Part of the DataTree API that must be overridden by subclasses. param: string $root Which portion of the tree to load. Defaults to param: boolean $reload Re-load already loaded values? return: mixed True on success or a PEAR_Error on failure. |
| _loadById($cid) X-Ref |
| Load a specific object identified by its unique ID ($id), and its parents, into the $_data array. param: integer $cid The unique ID of the object to load. return: mixed True on success or a PEAR_Error on failure. |
| getSortedTree($root, $loadTree = false, $sortby_name = null, $sortby_key = null, $direction = 0) X-Ref |
| Get a tree sorted by the specified attribute name and/or key. param: string $root Which portion of the tree to sort. param: boolean $loadTree Sort the tree starting at $root, or just the param: array $sortby_name Attribute name to use for sorting. param: array $sortby_key Attribute key to use for sorting. param: array $direction Sort direction: |
| add($object) X-Ref |
| Add an object. Part of the DataTree API that must be overridden by subclasses. param: mixed $fullname The object to add (string or DataTreeObject). |
| reorder($parents, $order = null, $cid = null) X-Ref |
| Change order of the children of an object. param: string $parents The parent id string path. param: mixed $order A specific new order position or an array param: integer $cid If provided indicates insertion of a new child |
| setOrder($id, $order) X-Ref |
| Explicitly set the order for a datatree object. param: integer $id The datatree object id to change. param: integer $order The new order. |
| remove($object, $force = false) X-Ref |
| Removes an object. param: mixed $object The object to remove. param: boolean $force Force removal of every child object? |
| removeByIds($ids) X-Ref |
| Remove one or more objects by id. This function does *not* do the validation, reordering, etc. that remove() does. If you need to check for children, re-do ordering, etc., then you must remove() objects one-by-one. This is for code that knows it's dealing with single (non-parented) objects and needs to delete a batch of them quickly. param: array $ids The objects to remove. |
| removeByNames($names) X-Ref |
| Remove one or more objects by name. This function does *not* do the validation, reordering, etc. that remove() does. If you need to check for children, re-do ordering, etc., then you must remove() objects one-by-one. This is for code that knows it's dealing with single (non-parented) objects and needs to delete a batch of them quickly. param: array $names The objects to remove. |
| move($object, $newparent = null) X-Ref |
| Move an object to a new parent. param: mixed $object The object to move. param: string $newparent The new parent object. Defaults to the root. |
| rename($old_object, $new_object_name) X-Ref |
| Change an object's name. param: mixed $old_object The old object. param: string $new_object_name The new object name. |
| getData($cid) X-Ref |
| Retrieve data for an object from the datatree_data field. param: integer $cid The object id to fetch, or an array of object ids. |
| getAttributes($cid) X-Ref |
| Retrieve data for an object. param: integer $cid The object id to fetch. |
| countByAttributes($criteria, $parent = DATATREE_ROOT, $allLevels = true, $restrict = 'name') X-Ref |
| Returns the number of objects matching a set of attribute criteria. param: array $criteria The array of criteria. param: string $parent The parent node to start searching from. param: boolean $allLevels Return all levels, or just the direct param: string $restrict Only return attributes with the same |
| getByAttributes($criteria, $parent = DATATREE_ROOT, $allLevels = true, $restrict = 'name', $from = 0, $count = 0,$sortby_name = null, $sortby_key = null, $direction = 0) X-Ref |
| Returns a set of object ids based on a set of attribute criteria. param: array $criteria The array of criteria. param: string $parent The parent node to start searching from. param: boolean $allLevels Return all levels, or just the direct param: string $restrict Only return attributes with the same param: integer $from The object to start to fetching param: integer $count The number of objects to fetch param: string $sortby_name Attribute name to use for sorting. param: string $sortby_key Attribute key to use for sorting. param: integer $direction Sort direction: |
| sortByAttributes($unordered_ids, $sortby_name = null, $sortby_key = null, $direction = 0) X-Ref |
| Sorts IDs by attribute values. IDs without attributes will be added to the end of the sorted list. param: array $unordered_ids Array of ids to sort. param: array $sortby_name Attribute name to use for sorting. param: array $sortby_key Attribute key to use for sorting. param: array $direction Sort direction: return: array Sorted ids. |
| getAttributeValues($attribute_name = null, $attribute_key = null, $parent = DATATREE_ROOT, $allLevels = true) X-Ref |
| Returns a list of all of the available values of the given attribute name/key combination. Either attribute_name or attribute_key MUST be supplied, and both MAY be supplied. param: string $attribute_name The name of the attribute. param: string $attribute_key The key value of the attribute. param: string $parent The parent node to start searching from. param: boolean $allLevels Return all levels, or just the direct return: array An array of all of the available values. |
| updateData($object) X-Ref |
| Update the data in an object. Does not change the object's parent or name, just serialized data. param: string $object The object. |
| Généré le : Sun Feb 25 18:01:28 2007 | par Balluche grâce à PHPXref 0.7 |