19 declare(strict_types=1);
    39         if ($this->subnodes !== []) {
    40             throw new \Exception(
"Use 'setSubnodes' during construction only", 1);
    42         foreach ($subnodes as $subnode) {
    43             $this->subnodes[$subnode->getId()] = $subnode->withContainer($this);
    53         $this->container = $node;
    65         $clone->subnodes[$node->getId()] = $node->withContainer($this);
    71         return array_values($this->subnodes);
    76         return $this->subnodes[
$id];
    81         $ret = [$this->
getId()];
    83         while ($node = $node->getContainer()) {
    84             $ret[] = $node->getId();
    86         return array_reverse($ret);
    94         if ($node->getId() == 
$id) {
    95             return $node->getPath();
    97         foreach ($node->getSubnodes() as $subnode) {
 
setSubnodes(array $subnodes)
 
findSubnodePath(string $id, ?Node $node=null)
 
withContainer(Node $node)
this is only used internally - do not use apart from constructing the tree!