Add ReaderOptions for all readers (#338)

Instead of passing every single option down the chain
This commit is contained in:
Adrien Loison authored and GitHub committed 2016-10-17 22:41:36 -07:00
1 parent b61323d7d2
commit 752f4bf64e
19 files changed
+332 -130

No files matched your search

+3 -4
View File
@@ -27,14 +27,13 @@ class Sheet implements SheetInterface
/**
* @param XMLReader $xmlReader XML Reader, positioned on the "<table:table>" element
* @param bool $shouldFormatDates Whether date/time values should be returned as PHP objects or be formatted as strings
* @param bool $shouldPreserveEmptyRows Whether empty rows should be returned or skipped
* @param int $sheetIndex Index of the sheet, based on order in the workbook (zero-based)
* @param \Box\Spout\Reader\ODS\ReaderOptions $options Reader's current options
* @param string $sheetName Name of the sheet
*/
public function __construct($xmlReader, $shouldFormatDates, $shouldPreserveEmptyRows, $sheetIndex, $sheetName)
public function __construct($xmlReader, $sheetIndex, $sheetName, $options)
{
$this->rowIterator = new RowIterator($xmlReader, $shouldFormatDates, $shouldPreserveEmptyRows);
$this->rowIterator = new RowIterator($xmlReader, $options);
$this->index = $sheetIndex;
$this->name = $sheetName;
}