Tree extends DataManager
Table of Contents
Constants
- BLOCK_INSERT_MTU = 9999
- SORT_FREE_AFTER = 2
- SORT_FREE_BEFORE = 1
- SORT_HOLE_SIZE = 10
- SORT_HOLE_SIZE_HALF = 5
- SPACE_ADD = 1
- SPACE_REMOVE = 2
Methods
- add() : mixed
- addExtended() : mixed
- Available keys in $additional REBALANCE - if set to true, method will rebalance tree after insertion
- checkFields() : mixed
- checkIntegrity() : mixed
- checkNodeIsParentOfNodeById() : mixed
- delete() : mixed
- deleteExtended() : DeleteResult
- Available keys in $additional REBALANCE - if set to true, method will rebalance tree after insertion DELETE_SUBTREE - if set to true, only node will be deleted, and it`s subtree left unattached
- getChildren() : mixed
- getCountByFilter() : mixed
- getDeepestCommonParent() : mixed
- getParentTree() : mixed
- Fetches a chain of parents with their subtrees expanded
- getPathToMultipleNodes() : mixed
- getPathToNode() : mixed
- getPathToNodeByCondition() : mixed
- Fetches a parent chain of a specified node
- getSubTree() : mixed
- Fetches a set of items which form sub-tree of a given node
- getSubtreeRangeSqlForNode() : mixed
- This method is for internal use only. It may be changed without any notification further, or even mystically disappear.
- mergeRelationsFromTemporalTable() : mixed
- resort() : mixed
- update() : mixed
- updateExtended() : mixed
- Available keys in $additional REBALANCE - if set to true, method will rebalance tree after insertion
Constants
BLOCK_INSERT_MTU
public
mixed
BLOCK_INSERT_MTU
= 9999
SORT_FREE_AFTER
public
mixed
SORT_FREE_AFTER
= 2
SORT_FREE_BEFORE
public
mixed
SORT_FREE_BEFORE
= 1
SORT_HOLE_SIZE
public
mixed
SORT_HOLE_SIZE
= 10
SORT_HOLE_SIZE_HALF
public
mixed
SORT_HOLE_SIZE_HALF
= 5
SPACE_ADD
public
mixed
SPACE_ADD
= 1
SPACE_REMOVE
public
mixed
SPACE_REMOVE
= 2
Methods
add()
public
static add(array<string|int, mixed> $data) : mixed
Parameters
- $data : array<string|int, mixed>
addExtended()
Available keys in $additional REBALANCE - if set to true, method will rebalance tree after insertion
public
static addExtended(array<string|int, mixed> $data[, array<string|int, mixed> $additional = array() ]) : mixed
Parameters
- $data : array<string|int, mixed>
- $additional : array<string|int, mixed> = array()
checkFields()
public
static checkFields(Result $result, mixed $primary, array<string|int, mixed> $data) : mixed
Parameters
- $result : Result
- $primary : mixed
- $data : array<string|int, mixed>
checkIntegrity()
public
static checkIntegrity() : mixed
checkNodeIsParentOfNodeById()
public
static checkNodeIsParentOfNodeById(mixed $primary, mixed $childPrimary[, mixed $behaviour = array('CHECK_DIRECT' => false) ]) : mixed
Parameters
- $primary : mixed
- $childPrimary : mixed
- $behaviour : mixed = array('CHECK_DIRECT' => false)
delete()
public
static delete(mixed $primary) : mixed
Parameters
- $primary : mixed
deleteExtended()
Available keys in $additional REBALANCE - if set to true, method will rebalance tree after insertion DELETE_SUBTREE - if set to true, only node will be deleted, and it`s subtree left unattached
public
static deleteExtended(mixed $primary[, array<string|int, mixed> $additional = array() ]) : DeleteResult
Parameters
- $primary : mixed
- $additional : array<string|int, mixed> = array()
Tags
Return values
DeleteResultgetChildren()
public
static getChildren(mixed $primary[, mixed $parameters = array() ]) : mixed
Parameters
- $primary : mixed
- $parameters : mixed = array()
getCountByFilter()
public
static getCountByFilter([mixed $filter = array() ]) : mixed
Parameters
- $filter : mixed = array()
getDeepestCommonParent()
public
static getDeepestCommonParent([mixed $nodeInfo = array() ][, mixed $parameters = array() ]) : mixed
Parameters
- $nodeInfo : mixed = array()
- $parameters : mixed = array()
getParentTree()
Fetches a chain of parents with their subtrees expanded
public
static getParentTree(mixed $primary[, mixed $parameters = array() ][, mixed $behaviour = array('SHOW_CHILDREN' => true, 'START_FROM' => false) ]) : mixed
Available keys in $behaviour SHOW_CHILDREN : if set to true, do return direct ancestors of $primary in the result START_FROM
Parameters
- $primary : mixed
- $parameters : mixed = array()
- $behaviour : mixed = array('SHOW_CHILDREN' => true, 'START_FROM' => false)
getPathToMultipleNodes()
public
static getPathToMultipleNodes([mixed $nodeInfo = array() ][, mixed $parameters = array() ][, mixed $behaviour = array('SHOW_LEAF' => true) ]) : mixed
Parameters
- $nodeInfo : mixed = array()
- $parameters : mixed = array()
- $behaviour : mixed = array('SHOW_LEAF' => true)
getPathToNode()
public
static getPathToNode(mixed $primary, mixed $parameters[, mixed $behaviour = array('SHOW_LEAF' => true) ]) : mixed
Parameters
- $primary : mixed
- $parameters : mixed
- $behaviour : mixed = array('SHOW_LEAF' => true)
getPathToNodeByCondition()
Fetches a parent chain of a specified node
public
static getPathToNodeByCondition(mixed $filter[, mixed $parameters = array() ][, mixed $behaviour = array('SHOW_LEAF' => true) ]) : mixed
Available keys in $behaviour SHOW_LEAF : if set to true, return node itself in the result
Parameters
- $filter : mixed
- $parameters : mixed = array()
- $behaviour : mixed = array('SHOW_LEAF' => true)
Tags
getSubTree()
Fetches a set of items which form sub-tree of a given node
public
static getSubTree(mixed $primary[, mixed $parameters = array() ]) : mixed
Parameters
- $primary : mixed
- $parameters : mixed = array()
getSubtreeRangeSqlForNode()
This method is for internal use only. It may be changed without any notification further, or even mystically disappear.
public
static getSubtreeRangeSqlForNode(mixed $primary[, mixed $node = array() ]) : mixed
Parameters
- $primary : mixed
- $node : mixed = array()
Tags
mergeRelationsFromTemporalTable()
public
static mergeRelationsFromTemporalTable(mixed $temporalTabName[, mixed $additinalFlds = array() ][, mixed $fldMap = array() ]) : mixed
Parameters
- $temporalTabName : mixed
- $additinalFlds : mixed = array()
- $fldMap : mixed = array()
resort()
public
static resort([mixed $dontCareEvents = false ]) : mixed
Parameters
- $dontCareEvents : mixed = false
update()
public
static update(mixed $primary, array<string|int, mixed> $data) : mixed
Parameters
- $primary : mixed
- $data : array<string|int, mixed>
updateExtended()
Available keys in $additional REBALANCE - if set to true, method will rebalance tree after insertion
public
static updateExtended(mixed $primary, array<string|int, mixed> $data[, array<string|int, mixed> $additional = array() ]) : mixed
Parameters
- $primary : mixed
- $data : array<string|int, mixed>
- $additional : array<string|int, mixed> = array()