/** * Wrapper method for MongoCursor::immortal(). * * @see \Doctrine\MongoDB\Cursor::immortal() * @see http://php.net/manual/en/mongocursor.immortal.php * @param boolean $liveForever * @return self */ public function immortal($liveForever = true) { $this->baseCursor->immortal($liveForever); return $this; }
protected function prepareCursor(Cursor $cursor) { $cursor->limit($this->query['limit']); $cursor->skip($this->query['skip']); $cursor->sort($this->query['sort']); $cursor->immortal($this->query['immortal']); if (null !== $this->query['slaveOkay']) { $cursor->slaveOkay($this->query['slaveOkay']); } if ($this->query['snapshot']) { $cursor->snapshot(); } foreach ($this->query['hints'] as $keyPattern) { $cursor->hint($keyPattern); } if ($this->query['eagerCursor'] === true) { $cursor = new EagerCursor($cursor); } return $cursor; }
protected function prepareCursor(Cursor $cursor) { $cursor->limit($this->query['limit']); $cursor->skip($this->query['skip']); $cursor->sort($this->query['sort']); $cursor->immortal($this->query['immortal']); $cursor->slaveOkay($this->query['slaveOkay']); if ($this->query['snapshot']) { $cursor->snapshot(); } foreach ($this->query['hints'] as $keyPattern) { $cursor->hint($keyPattern); } }