Doctrine\MongoDB\Aggregation\Builder::execute PHP Method

execute() public method

Executes the aggregation pipeline
public execute ( array $options = [] ) : Doctrine\MongoDB\Iterator
$options array
return Doctrine\MongoDB\Iterator
    public function execute($options = [])
    {
        return $this->collection->aggregate($this->getPipeline(), $options);
    }

Usage Example

Example #1
0
 /**
  * {@inheritdoc}
  */
 public function execute($options = [])
 {
     // Force cursor to be used
     $options = array_merge($options, ['cursor' => true]);
     $cursor = parent::execute($options);
     return $this->prepareCursor($cursor);
 }
All Usage Examples Of Doctrine\MongoDB\Aggregation\Builder::execute