/** * Adds a page and all of its children * @param Page $page The current page */ private function AddPageBranch(Page $page) { $this->AddPage($page); $child = $this->pageTree->FirstChildOf($page); while ($child) { $this->AddPageBranch($child); $child = $this->pageTree->NextOf($child); } }
protected function NextChild() { $child = $this->child; $this->child = $this->tree->NextOf($this->child); return $child; }
/** * * @return Page Returns the next page after the current page */ protected function NextPage() { $page = $this->page; $this->page = $this->tree->NextOf($this->page); return $page; }