diff --git a/src/Spout/Reader/CSV/RowIterator.php b/src/Spout/Reader/CSV/RowIterator.php index 1312d9c5..1b1b62cb 100644 --- a/src/Spout/Reader/CSV/RowIterator.php +++ b/src/Spout/Reader/CSV/RowIterator.php @@ -8,13 +8,13 @@ use Box\Spout\Common\Manager\OptionsManagerInterface; use Box\Spout\Reader\Common\Entity\Options; use Box\Spout\Reader\CSV\Creator\InternalEntityFactory; -use Box\Spout\Reader\IteratorInterface; +use Box\Spout\Reader\RowIteratorInterface; /** * Class RowIterator * Iterate over CSV rows. */ -class RowIterator implements IteratorInterface +class RowIterator implements RowIteratorInterface { /** * Value passed to fgetcsv. 0 means "unlimited" (slightly slower but accomodates for very long lines). diff --git a/src/Spout/Reader/CSV/SheetIterator.php b/src/Spout/Reader/CSV/SheetIterator.php index 69eb58a0..890c62ba 100644 --- a/src/Spout/Reader/CSV/SheetIterator.php +++ b/src/Spout/Reader/CSV/SheetIterator.php @@ -2,13 +2,13 @@ namespace Box\Spout\Reader\CSV; -use Box\Spout\Reader\IteratorInterface; +use Box\Spout\Reader\SheetIteratorInterface; /** * Class SheetIterator * Iterate over CSV unique "sheet". */ -class SheetIterator implements IteratorInterface +class SheetIterator implements SheetIteratorInterface { /** @var \Box\Spout\Reader\CSV\Sheet The CSV unique "sheet" */ protected $sheet; diff --git a/src/Spout/Reader/ReaderAbstract.php b/src/Spout/Reader/ReaderAbstract.php index 39b333d4..6c08bec7 100644 --- a/src/Spout/Reader/ReaderAbstract.php +++ b/src/Spout/Reader/ReaderAbstract.php @@ -7,6 +7,7 @@ use Box\Spout\Common\Manager\OptionsManagerInterface; use Box\Spout\Reader\Common\Creator\InternalEntityFactoryInterface; use Box\Spout\Reader\Common\Entity\Options; +use Box\Spout\Reader\CSV\SheetIterator; use Box\Spout\Reader\Exception\ReaderNotOpenedException; /** @@ -46,7 +47,7 @@ abstract protected function openReader($filePath); /** * Returns an iterator to iterate over sheets. * - * @return IteratorInterface To iterate over sheets + * @return SheetIteratorInterface To iterate over sheets */ abstract protected function getConcreteSheetIterator(); @@ -211,7 +212,7 @@ protected function isPhpStream($filePath) * Returns an iterator to iterate over sheets. * * @throws \Box\Spout\Reader\Exception\ReaderNotOpenedException If called before opening the reader - * @return \Iterator To iterate over sheets + * @return SheetIteratorInterface To iterate over sheets */ public function getSheetIterator() { diff --git a/src/Spout/Reader/ReaderInterface.php b/src/Spout/Reader/ReaderInterface.php index 74bcc4a9..28284037 100644 --- a/src/Spout/Reader/ReaderInterface.php +++ b/src/Spout/Reader/ReaderInterface.php @@ -21,7 +21,7 @@ public function open($filePath); * Returns an iterator to iterate over sheets. * * @throws \Box\Spout\Reader\Exception\ReaderNotOpenedException If called before opening the reader - * @return \Iterator To iterate over sheets + * @return SheetIteratorInterface To iterate over sheets */ public function getSheetIterator(); diff --git a/src/Spout/Reader/RowIteratorInterface.php b/src/Spout/Reader/RowIteratorInterface.php new file mode 100644 index 00000000..ccde594a --- /dev/null +++ b/src/Spout/Reader/RowIteratorInterface.php @@ -0,0 +1,22 @@ +