Nextras\Orm\Collection\ICollection::limitBy PHP Method

limitBy() public method

Limits number of rows.
public limitBy ( integer $limit, integer $offset = null ) : Nextras\Orm\Collection\ICollection
$limit integer
$offset integer
return Nextras\Orm\Collection\ICollection
    public function limitBy($limit, $offset = null);

Usage Example

Example #1
0
 public function getIterator() : IteratorAggregate
 {
     return $this->collection->limitBy($this->paginator->getItemsPerPage(), $this->paginator->getOffset()) ?: parent::getIterator();
 }