TreeHelper
in package
implements
RecursiveIterator
FinalYes
The TreeHelper class provides methods to display tree-like structures.
Tags
Table of Contents
Interfaces
- RecursiveIterator
Properties
Methods
- createTree() : self
- current() : TreeNode
- getChildren() : RecursiveIterator
- hasChildren() : bool
- key() : int
- next() : void
- render() : void
- Recursively renders the tree to the output, applying the tree style.
- rewind() : void
- valid() : bool
- __construct() : mixed
Properties
$children
private
Iterator<int, TreeNode>
$children
$node read-only
private
TreeNode
$node
$output read-only
private
OutputInterface
$output
$style read-only
private
TreeStyle
$style
Methods
createTree()
public
static createTree(OutputInterface $output[, string|TreeNode|null $root = null ][, iterable<string|int, mixed> $values = [] ][, TreeStyle|null $style = null ]) : self
Parameters
- $output : OutputInterface
- $root : string|TreeNode|null = null
- $values : iterable<string|int, mixed> = []
- $style : TreeStyle|null = null
Return values
selfcurrent()
public
current() : TreeNode
Return values
TreeNodegetChildren()
public
getChildren() : RecursiveIterator
Return values
RecursiveIteratorhasChildren()
public
hasChildren() : bool
Return values
boolkey()
public
key() : int
Return values
intnext()
public
next() : void
render()
Recursively renders the tree to the output, applying the tree style.
public
render() : void
rewind()
public
rewind() : void
valid()
public
valid() : bool
Return values
bool__construct()
private
__construct(OutputInterface $output, TreeNode $node, TreeStyle $style) : mixed
Parameters
- $output : OutputInterface
- $node : TreeNode
- $style : TreeStyle