Creates a row iterator for the XML given worksheet file
public create ( |
||
$valueTransformer | the value transformer for the spreadsheet | |
$path | string | the path to the extracted XML worksheet file |
$options | array | options specific to the format |
$archive | Akeneo\Component\SpreadsheetParser\Xlsx\Archive | The Archive from which the path was extracted |
return |
public function it_creates_row_iterators(ValueTransformer $valueTransformer, RowIteratorFactory $rowIteratorFactory, RowIterator $rowIterator1, RowIterator $rowIterator2) { $rowIteratorFactory->create($valueTransformer, 'temp_path1', [])->willReturn($rowIterator1); $rowIteratorFactory->create($valueTransformer, 'temp_path2', [])->willReturn($rowIterator2); $this->createRowIterator(0)->shouldReturn($rowIterator1); $this->createRowIterator(1)->shouldReturn($rowIterator2); }
/** * {@inheritdoc} */ public function createRowIterator($worksheetIndex, array $options = []) { $paths = array_values($this->getWorksheetPaths()); return $this->rowIteratorFactory->create($this->getValueTransformer(), $this->archive->extract($paths[$worksheetIndex]), $options); }