Sets the pagination (limit/offset) criteria.

@param   int     $offset
@param   int     $limit
@return  self
195693
public function setPagination($offset, $limit)
    {
        $this->pagination['offset'] = (Integer) $offset;
        $this->pagination['limit'] = (Integer) $limit;
        return $this;
    }
1321420
public function pagination(int $limit = 20, int $offset = 0, ?callable $totalQuery = null)
    {
        $query = clone $this->selectQueryInstance();

        return $query->paginate($limit, $offset, $totalQuery);
    }
1032397
public function limit($offset, $limit)
	{
		$this->criteria->setFirstResult($offset)->setMaxResults($limit);

		return $this;
	}
427801
public function limit($offset, $limit)
	{
		$data = array_slice($this->data, $offset, $limit);
		$this->setData($data);

		return $this;
	}
197256
public function setOffset($offset)
    {
        $this->offset = $offset;
        $this->queryBuilder->setFirstResult($offset);
        return $this;
    }
160534
public function setLimit($limit) {
        if(is_numeric($limit))
            $this->items_per_page = $limit;
        $this->setCurrent( self::findCurrentPage($this->routeKey));
    }
788384
public function limit($limit, $offset = null)
    {
        $this->queryBuilder->setLimit($limit, $offset);
        return $this;
    }
976830
public function limit($limit, $offset = 0)
    {
        $this->builderCache->store('limit', $limit);
        $this->offset($offset);

        return $this;
    }
1354310
public function setLimit(int $limit, ?int $offset = null): self
    {
        $this->limit = $limit;
        if ($offset !== null) {
            $this->setOffset($offset);
        }

        return $this;
    }
1148232
public function limit(int $limit, int $offset = null): self
    {
        $this->query['limit'] = ($offset === null)
            ? [abs($limit)] : [abs($limit), abs($offset)];

        return $this;
    }
219918
public function limit($limit, $offset = null)
    {
        if ($offset !== null) {
            $this->builder->setFirstResult((int) $offset);
        }

        $this->builder->setMaxResults((int) $limit);

        return $this;
    }
1354869
public function limit($offset = 0, $limit = 10)
    {
        $limit < 1 && $limit = 100;
        $this->sql['limit'] = [$offset, $limit];
        return $this;
    }
813337
protected function addLimit($limit, $offset = null) {
        $limitQuery = '';

        if (intval($limit) > 0) {
            $limitQuery .= $this->getDriverEscaper()->dbCommand('LIMIT') . ' ' . $limit;  
            if (!is_null($offset)) {
                $limitQuery .= ' ' . $this->getDriverEscaper()->dbCommand('OFFSET') . ' ' . $offset;
            }
        }
        

        return $limitQuery;
    }
1107907
protected function queryLimitOffset($query, $limit = null, $offset = 0)
    {
        $limit  = $limit ?: $this->limit;
        $offset = $offset ?: $this->offset;

        if ($limit) {
            $query->take($limit)->skip($offset);
        }

        return $query;
    }
1197495
public function limit($limit, $offset = null)
    {
        $this->_limit = $limit > 0 ? (int)$limit : null;
        $this->_offset = $offset > 0 ? (int)$offset : null;

        return $this;
    }
1029925
public function find($limit = 20, $offset = 0)
	{
		return $this->buildFind()
			->setLimit($limit)
			->setOffset($offset)
			->find();
	}
401917
public function limit($limit, $offset = null)
    {
        $self              = self::getInstance();
        $offset            = (!empty($offset)) ? 'OFFSET '.$offset : null;
        $self->optionLimit = " LIMIT {$limit} ".$offset;

        return $self;
    }