execute() public method

Executes the aggregation pipeline
public execute ( array $options = [] ) : Doctrine\MongoDB\Iterator
$options array
return Doctrine\MongoDB\Iterator
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);
 }
Example #2
0
 /**
  * Executes the aggregation pipeline
  *
  * @param array $options
  * @return Iterator
  */
 public function execute($options = [])
 {
     return $this->builder->execute($options);
 }