Doctrine\MongoDB\Aggregation\Builder::limit PHP 메소드

limit() 공개 메소드

Limits the number of documents passed to the next stage in the pipeline.
또한 보기: http://docs.mongodb.org/manual/reference/operator/aggregation/limit/
public limit ( integer $limit ) : Doctrine\MongoDB\Aggregation\Stage\Limit
$limit integer
리턴 Doctrine\MongoDB\Aggregation\Stage\Limit
    public function limit($limit)
    {
        return $this->addStage(new Stage\Limit($this, $limit));
    }

Usage Example

예제 #1
0
파일: Stage.php 프로젝트: alcaeus/mongodb
 /**
  * Limits the number of documents passed to the next stage in the pipeline.
  *
  * @see http://docs.mongodb.org/manual/reference/operator/aggregation/limit/
  *
  * @param integer $limit
  * @return Stage\Limit
  */
 public function limit($limit)
 {
     return $this->builder->limit($limit);
 }