Basic tree composite blueprint.
$ composer install earc/tree
use eArc\Tree\Node;
$root = new Node();
$root->addChild(new Node($root), 'identifier');
$root->getChild('identifier');
Please refer to the NodeInterface for details.
If you want to add the tree composite functionality to a existing class use the
eArc\Tree\Node\NodeTrait
.