diff --git a/modules/doc/library/Doc/DocTree.php b/modules/doc/library/Doc/DocTree.php deleted file mode 100644 index 66b36f1a4..000000000 --- a/modules/doc/library/Doc/DocTree.php +++ /dev/null @@ -1,79 +0,0 @@ -getId(); - if (isset($this->nodes[$rootId])) { - $rootId = uniqid($rootId); -// throw new LogicException( -// sprintf('Can\'t add root node: a root node with the id \'%s\' already exists', $rootId) -// ); - } - $this->nodes[$rootId] = $this->appendChild($root); - } - - /** - * Append a child node to a parent node - * - * @param Identifiable $child - * @param Identifiable $parent - * - * @throws LogicException If the the tree does not contain the parent node - */ - public function addChild(Identifiable $child, Identifiable $parent) - { - $childId = $child->getId(); - $parentId = $parent->getId(); - if (isset($this->nodes[$childId])) { - $childId = uniqid($childId); -// throw new LogicException( -// sprintf('Can\'t add child node: a child node with the id \'%s\' already exists', $childId) -// ); - } - if (! isset($this->nodes[$parentId])) { - throw new LogicException( - sprintf(mt('doc', 'Can\'t add child node: there\'s no parent node having the id \'%s\''), $parentId) - ); - } - $this->nodes[$childId] = $this->nodes[$parentId]->appendChild($child); - } - - /** - * Get a node - * - * @param mixed $id - * - * @return Node|null - */ - public function getNode($id) - { - if (! isset($this->nodes[$id])) { - return null; - } - return $this->nodes[$id]; - } -}