public function currentPage() { $currentRoute = $this->router->getCurrentRoute(); if (!$currentRoute) { return 1; } $query = $currentRoute->parameter('pageQuery'); return (int) str_replace($this->pageKeyword . '/', '', $query) ?: 1; }