Doctrine\MongoDB\Query\Builder::eagerCursor PHP Method

eagerCursor() public method

Set whether the query should return its result as an EagerCursor.
public eagerCursor ( boolean $bool = true )
$bool boolean
    public function eagerCursor($bool = true)
    {
        $this->query['eagerCursor'] = (bool) $bool;
        return $this;
    }

Usage Example

Beispiel #1
0
 /**
  * {@inheritdoc}
  */
 public function eagerCursor($bool = true)
 {
     if (!$bool && !empty($this->primers)) {
         throw new \BadMethodCallException("Can't set eagerCursor to false when using reference primers");
     }
     return parent::eagerCursor($bool);
 }