public function url($page)
    {
        if ($page <= 0) {
            $page = 1;
        }

        // 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.
        $parameters = [$this->pageName => $page];

        if (count($this->query) > 0) {
            $parameters = array_merge($this->query, $parameters);
        }

        $uri = Uri::createFromString($this->path);

        parse_str($uri->getQuery(), $queryParts);

        return $uri->withQuery(http_build_query($parameters + $queryParts))
            ->withFragment($this->buildFragment())
            ->__toString();
    }
public function url($page)
    {
        if ($page <= 0) {
            $page = 1;
        }

        // 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.
        $parameters = [$this->pageName => $page];

        if (count($this->query) > 0) {
            $parameters = array_merge($this->query, $parameters);
        }

        $uri = Uri::createFromString($this->path);

        parse_str($uri->getQuery(), $queryParts);

        return $uri->withQuery(http_build_query($parameters + $queryParts))
            ->withFragment($this->buildFragment())
            ->__toString();
    }
public function url ( $ page ) { if ( $ page <= 0 ) { $ page = 1 ; } // 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. $ parameters = [ $ this -> pageName => $ page ] ; if ( count ( $ this -> query ) > 0 ) { $ parameters = array_merge ( $ this -> query , $ parameters ) ; } $ uri = Uri :: createFromString ( $ this -> path ) ; parse_str ( $ uri -> getQuery ( ) , $ queryParts ) ; return $ uri -> withQuery ( http_build_query ( $ parameters + $ queryParts ) ) -> withFragment ( $ this -> buildFragment ( ) ) -> __toString ( ) ; }
Get the URL for a given page number.

@param int $page

@return string
Get the URL for a given page number .