/** * Shortcut for an inside comic page */ public function getComicInside() { if ($this->query) { $this->getVarsComicNav(); } else { $x = $this->path[2]; remove_first_slash($x); $this->where['sort_order'] = $x; } $this->getComicPage(); }
/** * Get the chapter number from a request formatted “/comic/archive?1” or “/comic/options/archive/1” */ protected function getChapterNum() { if ($this->query) { $id = array_keys($this->query); $this->chapterNum = $id[0]; } else { $x = $this->path[3]; remove_first_slash($x); if (is_numeric($x)) { $this->chapterNum = $x; } } }
/** * For requests two levels deep such as “/mycomic/123” * * @return string $route - keyphrase for route */ protected function requestLevelTwo() { $str = $this->path[1] . $this->path[2]; if ($this->menu[$str] && $this->menu[$str]['rel_type'] == 'archive') { $route = 'comic-archive'; } $x = $this->path[2]; remove_first_slash($x); if ($this->menu[$this->path[1]] && is_numeric($x)) { $route = 'comic-inside'; } return $route; }