/**
* Get the children of this node
*
* @param boolean $recursive False by default
*
* @return NodeInterface[] The children
*
* @since 4.0.0
*/
public function &getChildren($recursive = false)
{
if ($recursive) {
$items = array();
foreach ($this->_children as $child) {
$items[] = $child;
$items = array_merge($items, $child->getChildren(true));
}
return $items;
}
return $this->_children;
}