public function addChild($title) { $child = new Item($title); $child->setParent($this); $this->children[] = $child; return $child; }