Sets the current page number.

@param integer $page_number Page number.
974071
public function setCurrentPage( $page_number )
	{
		if ( !is_int( $page_number ) )
		{
			trigger_error( 'Pagination setCurrentPage: Page number must be an integer.' );
			return false;
		}

		if ( $page_number <= 0 )
		{
			trigger_error( 'Pagination setCurrentPage: Page number must be a positive integer.' );
			return false;
		}

		$this->current_page_number = $page_number;
	}
1285228
private function _currentPage(): int
    {
        $currentPage = Craft::$app->getRequest()->getQueryParam($this->pageParam, 1);

        if (is_numeric($currentPage) && $currentPage > $this->totalPages) {
            $currentPage = $this->totalPages > 0 ? $this->totalPages : 1;
        } else if (!is_numeric($currentPage) || $currentPage < 0) {
            $currentPage = 1;
        }

        return (int)$currentPage;
    }
375176
function changePage(pageNumber) {
      var emit = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;

      if (pageNumber > 0 && this.total > this.currentPerPage * (pageNumber - 1)) {
        this.prevPage = this.currentPage;
        this.currentPage = pageNumber;
        if (emit) this.pageChanged();
      }
    }
1164021
@Override
  public int setPageID(P page) {
    int pageID = page.getPageID();
    if(pageID == -1) {
      pageID = getNextEmptyPageID();
      if(pageID == -1) {
        pageID = nextPageID++;
      }
      page.setPageID(pageID);
    }
    return pageID;
  }
216204
public function setPage($page)
    {
        $this->page = min($page > 0 ? $page : $this->getFirstPage(), $this->getLastPage());
    }
62883
public function setCurrentPage($page) {
		$this->_currentPage = (int) $page;
		
		if ($this->_currentPage < 1) {
			throw new RuntimeException('Page number can\'t be zero or negative');
		}
		
		$this->reset();
		
		return $this;
	}
214675
def _set_current_page(self, current_page):
        
        if not current_page:
            self.resolve_current_page()

        if not self._is_valid_page_number(current_page):
            return 1

        return current_page
495742
public function setPage(int $page): Pagination
    {
        $this->current_page = $page;
        $this->calculate();
        return $this;
    }
350701
protected function setPage($page_id)
    {
        $this->data_page = $this->page->get($page_id);

        if (empty($this->data_page)) {
            $this->outputHttpStatus(404);
        }

        $this->controlAccessPage();
        $this->preparePage($this->data_page);
    }
896351
private function setCurrentPage($currentPage, $fixRange = true)
    {
        if ($fixRange === true) {
            if (!$this->pageInRange($currentPage)) {
                $currentPage = 1;
            }
        }

        $this->currentPage = (int) $currentPage;
        return $this;
    }
440698
protected function SetActivePageSort()
    {
        $this->sActivePageSort = $this->GetUserInput('pagesort');
        if (empty($this->sActivePageSort)) {
            //load default
            $this->sActivePageSort = $this->GetPageSortDefaultValue(); //default
            $this->SetModuleSessionParameter('pagesort', $this->sActivePageSort);
        } else {
            $bFound = false;
            foreach ($this->aPageSort as $iPsKey => $aPsVal) {
                if (in_array($this->sActivePageSort, $aPsVal)) {
                    $bFound = true;
                }
            }
            if (!$bFound) {
                //try to load from session
                $this->sActivePageSort = strtolower(trim($this->GetModuleSessionParameter('pagesort', false)));
                if (!$this->sActivePageSort) {
                    $this->sActivePageSort = $this->aPageSort[1]['id'];
                } //default
                $this->SetModuleSessionParameter('pagesort', $this->sActivePageSort);
            }
        }
    }
801942
public final function updatePage(WebPage $page, $number)
    {

        $page->beforeSaveToSession();
        $this->pages[$number] =  ($page);
    }
1197806
protected function setPagerListOrder()
    {
        $conditions = $this->query_filter;
        $conditions['count'] = true;

        $pager = array(
            'query' => $this->query_filter,
            'total' => (int) $this->order->getList($conditions)
        );

        return $this->data_limit = $this->setPager($pager);
    }
880021
public function paginate($page, $per_page=10) {
		$this->page = $page = $page ? $page:1;
		$this->per_page = $per_page;
		$this->offset(($page-1)*$per_page);
		$this->limit($per_page);

		return $this;
	}
1320932
def configure_pagination(page, options)
      page = super(page, options)
      raise ::Folio::InvalidPage unless page.current_page.is_a?(Integer)
      raise ::Folio::InvalidPage if page.out_of_bounds?
      page
    rescue ::WillPaginate::InvalidPage
      raise ::Folio::InvalidPage
    end
1330788
public function set_page_detail() {
        global $PAGE;
        if (!isset($this->data['other'])) {
            $this->data['other'] = array();
        }
        $this->data['other'] = array_merge(array('url'     => $PAGE->url->out_as_local_url(false),
                                             'heading'     => $PAGE->heading,
                                             'title'       => $PAGE->title), $this->data['other']);
    }
716190
function paging()
    {
        $this->num = $this->count();
        $offset = ($this->page - 1) * $this->page_size;
        if ($offset < 0)
        {
            $offset = 0;
        }
        if ($this->num % $this->page_size > 0)
        {
            $this->pages = intval($this->num / $this->page_size) + 1;
        }
        else
        {
            $this->pages = $this->num / $this->page_size;
        }
        $this->limit($offset . ',' . $this->page_size);
        $this->pager = new Pager(array('total'    => $this->num,
                                       'perpage'  => $this->page_size,
                                       'nowindex' => $this->page
        ));
    }