private function applyOptionsToCursor(Cursor $cursor, QueryOptions $options) { if ($this->timeLimit !== null) { $cursor->timeout($this->timeLimit); } return $cursor->skip($options->getOffset())->limit($options->getLimit()); }
/** * 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; }