TreeNode
in package
Table of Contents
- $children : array<string|int, self>
- $currentChild : self
- $displayed : bool
- $item : SimpleDataStore
- $parent : self
- $splited : bool
- __construct() : mixed
- NC22TreeNode constructor.
- addChild() : $this
- current() : TreeNode|null
- getItem() : SimpleDataStore
- getLevel() : int
- getParent() : TreeNode
- getPath() : array<string|int, TreeNode>
- getRoot() : $this
- haveNext() : bool
- isRoot() : bool
- isSplited() : bool
- setChildren() : TreeNode
- getCurrentChild() : TreeNode|null
- initCurrentChild() : bool
- isDisplayed() : bool
- next() : TreeNode
Properties
$children
private
array<string|int, self>
$children
= []
$currentChild
private
self
$currentChild
$displayed
private
bool
$displayed
= false
$item
private
SimpleDataStore
$item
$parent
private
self
$parent
$splited
private
bool
$splited
= false
Methods
__construct()
NC22TreeNode constructor.
public
__construct(self|null $parent, SimpleDataStore $item) : mixed
Parameters
- $parent : self|null
- $item : SimpleDataStore
Return values
mixed —addChild()
public
addChild(TreeNode $child) : $this
Parameters
- $child : TreeNode
Return values
$this —current()
public
current() : TreeNode|null
Return values
TreeNode|null —getItem()
public
getItem() : SimpleDataStore
Return values
SimpleDataStore —getLevel()
public
getLevel() : int
Return values
int —getParent()
public
getParent() : TreeNode
Return values
TreeNode —getPath()
public
getPath() : array<string|int, TreeNode>
Return values
array<string|int, TreeNode> —getRoot()
public
getRoot() : $this
Return values
$this —haveNext()
public
haveNext() : bool
Return values
bool —isRoot()
public
isRoot() : bool
Return values
bool —isSplited()
public
isSplited() : bool
Return values
bool —setChildren()
public
setChildren(array<string|int, mixed> $children) : TreeNode
Parameters
- $children : array<string|int, mixed>
Return values
TreeNode —getCurrentChild()
private
getCurrentChild() : TreeNode|null
Return values
TreeNode|null —initCurrentChild()
private
initCurrentChild() : bool
Return values
bool —isDisplayed()
private
isDisplayed() : bool
Return values
bool —next()
private
next() : TreeNode