limit() публичный Метод

Set a limit on the number of documents returned. An offset from 0 can also be specified.
public limit ( integer $count, integer $offset ) : Query
$count integer The number of documents to return.
$offset integer The offset from which to return.
Результат Query The same instance of this class.
Пример #1
0
 public function testLimit()
 {
     $path = __DIR__ . '/fixtures/datastore/querytest';
     $config = new Config($path . '/');
     $repo = new Repository('countries', $config);
     $query = new Query($repo);
     $query->limit('10');
     $this->assertAttributeEquals(array(10, 0), 'limit', $query);
     $query->limit(5, 10);
     $this->assertAttributeEquals(array(5, 10), 'limit', $query);
     $query->limit(9, '11');
     $this->assertAttributeEquals(array(9, 11), 'limit', $query);
 }