nodes = new DLL(); // Doubly Linked List } abstract protected function makeChild($args); // overwriteable child generator; allows to define child type (eg.: admin classes that inherit from base class) function isEmpty() { return $this->nodes->isEmpty(); } function addChild($data,$b = null) { $this->nodes->addNode($data,$b); } function removeChild($id) { $this->nodes->removeNode($id); } function getChildByID($id) { return $this->nodes->findNode($id); } function getChildDataByID($id) { $tmp = $this->getChildByID($id); if($tmp != null) { return $tmp->data; } return null; } function getIterator() { return $this->nodes->getIterator(); } } ?>