private function applyOptionsToCursor(Cursor $cursor, QueryOptions $options)
 {
     if ($this->timeLimit !== null) {
         $cursor->timeout($this->timeLimit);
     }
     return $cursor->skip($options->getOffset())->limit($options->getLimit());
 }
コード例 #2
0
ファイル: Cursor.php プロジェクト: im286er/ent
 /**
  * Wrapper method for MongoCursor::timeout().
  *
  * @see \Doctrine\MongoDB\Cursor::timeout()
  * @see http://php.net/manual/en/mongocursor.timeout.php
  * @param integer $ms
  * @return self
  */
 public function timeout($ms)
 {
     $this->baseCursor->timeout($ms);
     return $this;
 }