/** * Adds a child to the current node. * * @param NodeInterface $child */ public function addChild(NodeInterface $child) { $this->children[$child->getName()] = $child; }