Nextras\Orm\Mapper\Dbal\DbalCollection::limitBy PHP Method

limitBy() public method

public limitBy ( $limit, $offset = null )
    public function limitBy($limit, $offset = null)
    {
        $collection = clone $this;
        $collection->queryBuilder->limitBy($limit, $offset);
        return $collection;
    }

Usage Example

示例#1
0
 /**
  * Apply limit and offset on data
  * @param int $offset
  * @param int $limit
  * @return static
  */
 public function limit($offset, $limit)
 {
     $this->data_source = $this->data_source->limitBy($limit, $offset);
     return $this;
 }