Set allowed pagination limits

@param array $limits

@return $this
163785
public function setLimits(array $limits = [])
    {
        if (empty($limits)) {
            throw new ListingException("You must provide at least one limit option");
        }

        $this->limits = array_values($limits);

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

        return $this;
    }
5548
protected function setPagerListAlias()
    {
        $conditions = $this->query_filter;
        $conditions['count'] = true;

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

        return $this->data_limit = $this->setPager($pager);
    }
462733
protected function getLimitQuery( $limits = array() )
	{
		if( is_array( $limits ) && count( $limits ) == 2 )
			$limits	= ' LIMIT '.$limits[0].', '.$limits[1];
		else if( is_int( $limits ) && $limits )
			$limits	= ' LIMIT 0, '.$limits;
		else
			$limits	= '';
		return $limits;
	}
982224
private function _setPagination(array $pagination) {
		foreach ($this->_paginationEnvelopeKeys as $key => $name) {
			$this->_pagination[$key] = isset($pagination[$name])
				? $pagination[$name]
				: null;
		}

		return $this;
	}
721174
public function limit($limit, $offset = null){
		if($this->validateConditions())
			return $this;

		$this->resetState();
		$this->limit = array($limit,
			($offset !== null && $this->type === Manager::STMT_SELECT) ? $offset : null);
		return $this;
	}
505042
public function setRedirectLimit($limit)
    {
        if (!is_int($limit)) {
            throw new InvalidArgumentException('redirectLimit must be an integer.');
        }

        if ($limit < 1) {
            throw new InvalidArgumentException('redirectLimit must be greater than or equal to one.');
        }

        $this->redirectLimit = $limit;

        return $this;
    }
1302362
function setLimit($limit) {
		if (null !== $limit) {
			$limit = (int) $limit;
		}
		$this->limit = $limit;
		return $this;
	}
295119
function limit($rows = 0, $start = 1) {
        if($rows > 0) {
            $start>0 and $start--;
            $this->limit = 'LIMIT '.($rows*$start).','.$rows;
        }
        return $this;
    }
205616
public function limit($limit, $offset = 0)
    {
        $this->limit = $limit;
        $this->offset = $offset;

        return $this;
    }
560751
public function paginate(array $params)
    {

        // page
        if (isset($params[$this->getParamPage()])) {
            $this->setPage($params[$this->getParamPage()]);
        }

        return $this;
    }
1369685
public function limit($limit) {
        if ( $limit ) {
            $this->limit = $limit;
        } else {
            //推荐列表查询一定是要分页的，如果没有分页则显示前1000条
            $this->limit = '0, '.self::PAGE_SIZE;
        }
        return $this;
    }
343099
public function limit($limit, $limit2 = null)
    {
        if (!is_null($limit2)) 
        {
            $this->offset = (int) $limit;
            $this->limit = (int) $limit2;
        } else {
            $this->limit = (int) $limit;
        }

        return $this;
    }
1210626
public function limit($offset, $limit)
	{
		$this->data_source = $this->data_source->limitBy($limit, $offset);

		return $this;
	}
680849
public function paginate($limit)
    {
        $capsule = $this->_database->getCapsule();
        $this->_model = $capsule->table($this->table);
        $paginator = new Pagination();
        $paginator->setLimit($limit)->setModel($this, $this->_model);

        return $paginator->paginate();
    }
180884
public function limit($limit)
    {
        if(!empty($limit))
            $this->selectParams[self::LIMIT] = $limit;
        else
            unset($this->selectParams[self::LIMIT]);
        return $this;
    }
213056
public function limit($limit) : QueryBuilder
    {
        $this->_query[] = "LIMIT";

        if(is_array($limit)) {
            $this->_query[] = $this->getQuoted($limit[0]).",";
            $this->_query[] = $this->getQuoted($limit[1]);

            return $this;
        }

        $this->_query[] = $this->getQuoted($limit);

        return $this;
    }