objectManager = $objectManager; $this->defaultIteratorName = $defaultIteratorName; } /** * Creates instance of the result iterator with the query result as an input * Result iterator can be changed through report configuration * * < ... * * Uses IteratorIterator by default * * @param \Traversable $result * @param string|null $iteratorName * @return \IteratorIterator */ public function create(\Traversable $result, $iteratorName = null) { return $this->objectManager->create( $iteratorName ?: $this->defaultIteratorName, [ 'iterator' => $result ] ); } }