Creates the URI for the specified page.

@param integer $page

@return string
544428
public function createUri($page)
    {
        $queryString   = $this->query;
        $queryString[] = "page={$page}";
        $queryString   = implode('&', $queryString);

        return Request::pathInfo() . "?{$queryString}";
    }
22731
public function getUrl($page)
	{
		$parameters = array(
			$this->env->getPageName() => $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)
		{
			$parameters = array_merge($parameters, $this->query);
		}

		$fragment = $this->buildFragment();

		return $this->env->getCurrentUrl().'?'.http_build_query($parameters, null, '&').$fragment;
	}
1029571
public function getUrl($page)
    {
        if (is_null($this->url)) {
            throw new RuntimeException('URL template must be defined');
        }

        if (strpos($this->url, $this->placeholder) !== false) {
            return str_replace($this->placeholder, $page, $this->url);
        } else {
            // Without placeholder, no substitution is done, therefore pagination links won't work
            throw new LogicException('The URL string must contain at least one placeholder to make pagination links work');
        }
    }
574813
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();
    }
141616
public function getPageUrl(Page $page)
    {
        return $this->config['base_url'].'/'.
            ($page->getSubFolder() === null ? '' : $page->getSubFolder().'/').
            $this->getPagePublishFilename($page);
    }
1224182
public static function getBySectionOfSite($page)
    {
        $identifier = sprintf('/multilingual/section/%s', $page->getCollectionID());
        $cache = \Core::make('cache/request');
        $item = $cache->getItem($identifier);
        if (!$item->isMiss()) {
            $returnID = $item->get();
        } else {

            $item->lock();

            $returnID = false;

            if ($page->isPageDraft()) {
                $tree = false;
                if ($page->getPageDraftTargetParentPageID()) {
                    $cParentID = $page->getPageDraftTargetParentPageID();
                    if ($cParentID) {
                        $parent = Page::getByID($cParentID);
                        $tree = $parent->getSiteTreeObject();
                    }
                }
            }

            if (!isset($tree)) {
                $tree = $page->getSiteTreeObject();
            }

            if ($tree instanceof SiteTree) {
                $returnID = $tree->getSiteHomePageID();
            }

            $cache->save($item->set($returnID));
        }

        if ($returnID) {
            return static::getByID($returnID);
        }
    }
357389
static function pageAction($uri)
    {
        $write = R::is('POST') and R::get('confirm');
        $page = page($uri);
        $builder = new Builder();
        $data = [
            'mode'    => 'page',
            'error'   => false,
            'confirm' => $write,
            'summary' => []
        ];
        if (!$page) {
            $data['error'] = "Error: Cannot find page for \"$uri\"";
        }
        else {
            $builder->run($page, $write);
            $data['summary'] = $builder->summary;
        }
        return $builder->htmlReport($data);
    }
63686
public function getUsersList($page = 1)
    {
        $this->checkPageNumber($page);

        return $this->adapter->get(sprintf('/users?page=%d', $page));
    }
1272539
public function getPageConfig(string $page)
    {
        if (!array_key_exists($page, $this->config['pages'])) {
            throw new InvalidPageException(
                sprintf(
                    'Page "%s" not found in current configuration. Available pages are: "%s"',
                    $page,
                    implode('", "', array_keys($this->config['pages']))
                )
            );
        }

        return (array) $this->config['pages'][$page];
    }
374558
protected function _getPaginatedUrl($page)
    {
        $url = $this->_getSortUrl();

        if ($page > 1) {
            if (!isset($url['?'])) {
                $url['?'] = [];
            }
            $url['?']['p'] = $page;
        }

        return $url;
    }
1366896
protected function _make_link($page)
	{
		// make sure we have a valid page number
		empty($page) and $page = 1;

		// construct a pagination url if we don't have one
		if (is_null($this->config['pagination_url']))
		{
			// start with the main uri
			$this->config['pagination_url'] = \Uri::main();
			\Input::get() and $this->config['pagination_url'] .= '?'.http_build_query(\Input::get());
		}

		// was a placeholder defined in the url?
		if (strpos($this->config['pagination_url'], '{page}') === false)
		{
			// break the url in bits so we can insert it
			$url = parse_url($this->config['pagination_url']);

			// parse the query string
			if (isset($url['query']))
			{
				parse_str($url['query'], $url['query']);
			}
			else
			{
				$url['query'] = array();
			}

			// do we have a segment offset due to the base_url containing segments?
			$seg_offset = parse_url(rtrim(\Uri::base(), '/'));
			$seg_offset = empty($seg_offset['path']) ? 0 : count(explode('/', trim($seg_offset['path'], '/')));

			// is the page number a URI segment?
			if (is_numeric($this->config['uri_segment']))
			{
				// get the URL segments
				$segs = isset($url['path']) ? explode('/', trim($url['path'], '/')) : array();

				// do we have enough segments to insert? we can't fill in any blanks...
				if (count($segs) < $this->config['uri_segment'] - 1)
				{
					throw new \RuntimeException("Not enough segments in the URI, impossible to insert the page number");
				}

				// replace the selected segment with the page placeholder
				$segs[$this->config['uri_segment'] - 1 + $seg_offset] = '{page}';
				$url['path'] = '/'.implode('/', $segs);
			}
			else
			{
				// add our placeholder
				$url['query'][$this->config['uri_segment']] = '{page}';
			}

			// re-assemble the url
			$query = empty($url['query']) ? '' : '?'.preg_replace('/%7Bpage%7D/', '{page}', http_build_query($url['query'], '', '&amp;'));
			unset($url['query']);
			empty($url['scheme']) or $url['scheme'] .= '://';
			empty($url['port']) or $url['host'] .= ':';
			$this->config['pagination_url'] = implode($url).$query;
		}

		// return the page link
		return str_replace('{page}', $page, $this->config['pagination_url']);
	}
849346
public function getUrl($page, $absolute = false, $routePrm = null)
    {
        $prm = !is_null($routePrm) ? $routePrm : $this->routePrm;
        $prm['page'] = $page;

        return $this->service->generateUrl($this->route, $prm, $absolute);
    }
1145366
public function page($page)
    {
        $page = (int)$page;

        if($page<0){
            throw new \RuntimeException('Invalid page specified', ResourceException::INVALID_PAGE);
        }

        $this->page = $page;

        return $this;
    }
8344
public function getSourceFile($page)
    {
        $path = realpath($this->generator->getInputDirectory() . '/' . $page . '.xml');

        return new SourceFile($page, $path);
    }
318782
public function paginatorPath($page)
    {
        $request = $this->requestStack->getMasterRequest();

        return $this->urlGenerator->generate(
            $request->attributes->get('_route'),
            array_merge($request->query->all(), [
                'entity' => $request->get('entity'),
                'page'   => $page,
            ])
        );
    }
1291910
static function FindPageRights(Page $page)
    {
        $currPage = $page;
        $result = null;
        do 
        {
            $result = $currPage->GetUserGroupRights();
            $currPage = $currPage->GetParent();
        } 
        while (!$result && $currPage);
        if (!$result && $page->GetSite())
        {
            $siteRights = $page->GetSite()->GetUserGroupRights();
            if ($siteRights)
            {
                return $siteRights->GetPageRights();
            }
        }
        return $result;
    }
144742
public function index($page = null)
    {
        $url = sprintf('buckets/%d/vaults/%d/documents.json', $this->bucket, $this->parent);

        $documents = $this->client->get($url, [
            'query' => [
                'page' => $page,
            ],
        ]);

        return $this->indexResponse($documents, Document::class);
    }