\Kaloa\Util\TreeNode

A simple tree structure

There will always be a single distinct root node

Summary

Methods
Properties
Constants
__construct()
addChild()
hasChildren()
setParent()
getParent()
getChildren()
getContent()
display()
getNodesByFilter()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Methods

__construct()

__construct(  $value) 

Parameters

$value

hasChildren()

hasChildren() 

getParent()

getParent() 

getChildren()

getChildren() 

getContent()

getContent() 

display()

display(integer  $level) 

Displays all elements from a tree in hierarchic order

Parameters

integer $level

Current level of indentation

getNodesByFilter()

getNodesByFilter(\Closure  $expr) : array

Parameters

\Closure $expr

Returns

array