/** * Get a URL for a given page number. * * @param int $page * @return string */ public function getUrl($page) { $url = $this->env->getCurrentUrl() . '?page=' . $page; // If we have any extra query string key / value pairs that need to be added // onto the URL, we will put them in query string form and then attach it // to the URL. This allows for extra information like sortings storage. if (count($this->query) > 0) { $url = $url . '&' . http_build_query($this->query); } return $url; }