public function getChild($id) { if (!isset($this->children[$id])) { throw new ChildNotFoundException("Child '{$id}' not found in this node."); } return $this->children[$id]['node']; }