Set the current page.

@param int $page A valid page number.
@return $this
962820
public function setPage(int $page) {
        if ($page < 0) {
            throw new \InvalidArgumentException("Invalid page '$page.'", 500);
        }

        $this->setOffset(($page - 1) * $this->getLimit());
        return $this;
    }
584567
public function setPaging($page, $perPage)
    {
        $this->setParam('page', $page);
        $this->setParam('per_page', $perPage);

        return $this;
    }
1322303
public function setPages(array $pages)
    {
        $this->pages = array();
        foreach ($pages as $page) {
            $this->addPage($page);
        }
        return $this;
    }
103885
public function setPageNumber($number)
    {
        $this->pageNumber = ($number === null ? 1 : (int)$number);
        if ($this->pageNumber < 1)
            $this->pageNumber = 1;

        return $this;
    }
985225
public function setPage($page)
    {
        if ($page > $this->getNumberOfPages() || $page < 1) {
            throw new PageDoesNotExist("Page {$page} does not exist");
        }

        $this->page = $page;

        return $this;
    }
1331393
public function setPage(\Haven\CmsBundle\Entity\Page $page = null) {
        $this->page = $page;

        return $this;
    }
1367250
public function page($page)
  {
    if (false === is_numeric($page) || $page <= 0)
    {
      throw new InvalidArgumentException(sprintf(
        '%s is an invalid page value. It has to be numeric and positive',
        $page
      ));
    }

    $this->responseConfig['optionalParameters'] = array_merge(
      $this->responseConfig['optionalParameters'],
      array("ItemPage" => $page)
    );

    return $this;
  }
165994
private function setCurrentPage()
    {
        if ($this->perPage == 'all') return;

        if ($this->hasInput('page'))
        {
            $page_input = $this->getInput('page');

            if ($this->isValidPageNumber($page_input))
            {
                $this->page = $page_input;
            }
        }
    }
300815
public function setPage($page)
    {
        if ($page < 1) {
            $page = 1;
        }

        if ($this->range == 0) {
            $this->setRange(25);
        }

        $this->start = ($page - 1) * $this->range;

        return $this;
    }
799020
public function setApplicationPage($page)
    {
        if (null !== $page) {
            Assert::string($page, 'The application page must be a string or null. Got: %s');
            Assert::notEmpty($page, 'The application page must not be empty.');
        }

        $this->applicationPage = $page;
    }
809403
public function page($page = null) {
			if ($page != null) {
				$this->_page = $page;
				return true;
			}
			else {
				return $this->_page;
			}
		}
539893
public function addChild(Page $page): Page
    {
        $this->children->add($page);

        if ($page->getParent() !== $this) {
            $page->setParent($this);
        }

        return $this;
    }
1113428
public function withPageAndPerPage($page, $perPage)
    {
        $new = clone $this;
        $new->offset = ($page - 1) * $perPage;
        $new->limit = $perPage;
        $new->paginationType = self::PAGED_PAGINATION;

        return $new;
    }
11370
public function page($page)
    {
        if (! $this->limit) return;
        $offset = $this->limit * ($page - 1);
        $this->offset($offset);
        return $this;
    }
1228321
public function setPage($page)
    {
        if (!isset($this->_persistence) || !($this->_persistence instanceof IPersistance)) {
            throw new Exception("Repository Exception : No existe la interfaz de la persistencia o no implementa la interfaz IPersistance.");
        }

        $limit = $this->_persistence->getLimit();

        if (!isset($limit)) {
            throw new Exception("Repository Exception : No estña seteado el limite de la operación de lectura.");
        }

        $this->_persistence->setOffset($limit * $page);

        return $this;
    }
1144053
public function setPage(\Amulen\PageBundle\Entity\Page $page = null) {
        $this->page = $page;

        return $this;
    }
360370
public function setCurrentPageNumber($pageNumber)
    {
        $this->currentPageNumber = (int) $pageNumber;
        $this->currentItems      = null;
        $this->currentItemCount  = null;

        return $this;
    }