public function execute(array $options = []) : Iterator
    {
        // Force cursor to be used
        $options = array_merge($options, ['cursor' => true]);

        $cursor = $this->collection->aggregate($this->getPipeline(), $options);
        assert($cursor instanceof Cursor);

        return $this->prepareIterator($cursor);
    }
public function execute(array $options = []) : Iterator
    {
        // Force cursor to be used
        $options = array_merge($options, ['cursor' => true]);

        $cursor = $this->collection->aggregate($this->getPipeline(), $options);
        assert($cursor instanceof Cursor);

        return $this->prepareIterator($cursor);
    }
public function execute ( array $ options = [ ] ) : Iterator { // Force cursor to be used $ options = array_merge ( $ options , [ 'cursor' => true ] ) ; $ cursor = $ this -> collection -> aggregate ( $ this -> getPipeline ( ) , $ options ) ; assert ( $ cursor instanceof Cursor ) ; return $ this -> prepareIterator ( $ cursor ) ; }
Executes the aggregation pipeline
Executes the aggregation pipeline