/** * @override to use our AbstractPage Removes the given page from the container * * @param Page\AbstractPage|int $page page to remove, either a page * instance or a specific page order * @return bool whether the removal was successful */ public function removePage($page) { // stoyan if ($page instanceof Page\AbstractPage) { $hash = $page->hashCode(); } elseif (is_int($page)) { $this->sort(); if (!($hash = array_search($page, $this->index))) { return false; } } else { return false; } if (isset($this->pages[$hash])) { unset($this->pages[$hash]); unset($this->index[$hash]); $this->dirtyIndex = true; return true; } return false; }
/** * Returns an array representation of the page * * @return array */ public function toArray() { return array_merge(parent::toArray(), array('uri' => $this->getUri())); }
/** * Returns an array representation of the page * * @return array associative array containing all page properties */ public function toArray() { return array_merge(parent::toArray(), array('action' => $this->getAction(), 'controller' => $this->getController(), 'params' => $this->getParams(), 'route' => $this->getRoute(), 'router' => $this->getRouter(), 'route_match' => $this->getRouteMatch())); }