src/web/Pagination.php
public function url($page = 1) {
        // Clean the page number
        $page = max(1, (int)$page);

        // No page number in URLs to first page
        if ($page === 1 AND !$this->first_page_in_url) {
            $page = NULL;
        }

        switch ($this->current_page_source) {
            case 'query_string':
            case 'mixed':

                return URL::site($this->request->uri() .
                    $this->query([$this->current_page_source_key => $page]));

            case 'route':

                return URL::site($this->route->url(array_merge($this->route_params,
                        array($this->current_page_source_key => $page))) . $this->query());
        }

        return '#';
    }
public function url($page = 1) {
        // Clean the page number
        $page = max(1, (int)$page);

        // No page number in URLs to first page
        if ($page === 1 AND !$this->first_page_in_url) {
            $page = NULL;
        }

        switch ($this->current_page_source) {
            case 'query_string':
            case 'mixed':

                return URL::site($this->request->uri() .
                    $this->query([$this->current_page_source_key => $page]));

            case 'route':

                return URL::site($this->route->url(array_merge($this->route_params,
                        array($this->current_page_source_key => $page))) . $this->query());
        }

        return '#';
    }
Generates the full URL for a certain page.

@param   integer  page number
@return  string   page URL