Sets the pagesize variable to the given integer, the totalrows variable
to the given integer, and the use_pages variable to true.
@param int $perpage
@param int $total
@return void
321558
function pagesize($perpage, $total) {
        $this->pagesize  = $perpage;
        $this->totalrows = $total;
        $this->use_pages = true;
    }
285632
public function setPagination($page, $perPage)
    {
        $this->setParam('page', $page);
        $this->setParam('per_page', $perPage);

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

        return $this;
    }
1008383
public function page ($page, $per_page = null)
	{
		$model = $this->model;

		if($per_page === null) { $per_page = $model::$per_page; }

		$this->offset($page * $per_page)->limit($per_page);

		return $this;
	}
11338
public function paginate(Builder $builder, $perPage, $page)
    {
        $result = $this->performSearch($builder, [
            'numericFilters' => $this->filters($builder),
            'from' => (($page * $perPage) - $perPage),
            'size' => $perPage,
        ]);

       $result['nbPages'] = $result['hits']['total']/$perPage;

        return $result;
    }
1034126
public function paginate($per_page = 10, $page_name = "page", $page = null)
    {

        $this->take($per_page);

        $page = $page ?: Request::get($page_name, 1);

        $this->skip(($page * $per_page) - $per_page);

        $objects = $this->get();

        return new Pagination($objects, $objects->total, $per_page, $page, ['path' => Request::url(), 'query' => Request::query()]);
    }
177823
public function set_total_users($totalusers) {
        $this->totalusers = $totalusers;
        $this->pages = ceil($this->totalusers / $this->perpage);
        if ($this->page > $this->pages) {
            $this->page = $this->pages;
        }
    }
705043
public function setPage($page)
    {
        $this->page = intval($page);
        
        if ($this->page == 0) {
            $this->page = 1;
        }
    }
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;
	}
962820
public function setPage(int $page) {
        if ($page < 0) {
            throw new \InvalidArgumentException("Invalid page '$page.'", 500);
        }

        $this->setOffset(($page - 1) * $this->getLimit());
        return $this;
    }
154567
public function make(array $items, $total, $perPage)
	{
		$paginator = new Paginator($this, $items, $total, $perPage);

		return $paginator->setupPaginationContext();
	}
80182
public function findPages($type, $page, $numberPerPage)
    {
        $offset = (($page - 1) * $numberPerPage);

        return $this
            ->createQueryBuilder('p')
            ->where('p.enabled = :enabled')
            ->andWhere('p.type = :type')
            ->orderBy('p.publicationDate', 'DESC')
            ->setParameters([
                'enabled' => true,
                'type' => $type,
            ])
            ->setFirstResult($offset)
            ->setMaxResults($numberPerPage)
            ->getQuery()
            ->getArrayResult();
    }
171251
public void setPage(int page) {
        if(page < 0)
            throw new IllegalArgumentException(Bundle.getErrorString("PagerModel_IllegalPage"));

        /* todo: need to check that the new 'current' page is in range given the first/last boundaries */
        _currentRow = new Integer(page * getPageSize());
    }
419215
public function export_external_structure($page = 0, $perpage = 0) {

        $this->buildforexternal = true;
        $this->add_all_values_to_output();
        // Set-up.
        $this->setup();
        // Override values, if needed.
        if ($perpage > 0) {
            $this->pageable = true;
            $this->currpage = $page;
            $this->pagesize = $perpage;
        } else {
            $this->pagesize = $this->get_total_responses_count();
        }
        $this->query_db($this->pagesize, false);
        $this->build_table();
        $this->close_recordset();
        return $this->dataforexternal;
    }
813225
public function setPage($page) {
    $this->page = intval($page);
    $this->offset = ($page - 1) * $this->pageSize;
  }
1067212
public function setPager ($total_count, $current_page, $url, $limit = PagerUtility::DISP_PER_PAGE, $options = []) {
 		$current_page	= $current_page ?: 1;
 		$options		= [
			'in_list_position'	=> $options['in_list_position']	?? 3,
			'max_link_disp'		=> $options['max_link_disp'] ?? 5,
 		];
 		$this->pager = PagerUtility::CreatePagerData($total_count, $current_page, $limit, $options);
 		$this->pager['enable']	= $total_count > $limit;
 		$this->pager['url']		= $url;

 		return $this->pager;
 	}
1277725
public function setItemsPerPage( $items_per_page )
	{
		if ( !is_int( $items_per_page ) )
		{
			trigger_error( 'Pagination setItemsPerPage: Items per page must be an integer.' );
			return false;
		}

		if ( $items_per_page <= 0 )
		{
			trigger_error( 'Pagination setItemsPerPage: Items per page must be a positive integer.' );
			return false;
		}

		$this->items_per_page = $items_per_page;
	}