Add methods to SheetInterface

The SheetInterface was missing methods common to all Sheets (getIndex, getName, isActive, isVisible).
This commit is contained in:
Adrien Loison authored and Adrien Loison committed 2019-05-17 21:38:29 +02:00
1 parent 40ee386edd
commit 69b0fb9eaf
2 files changed
+29 -3

No files matched your search

+8
View File
@@ -51,4 +51,12 @@ class Sheet implements SheetInterface
{ {
return true; return true;
} }
/**
* @return bool Always TRUE as the only sheet is always visible
*/
public function isVisible()
{
return true;
}
} }
+21 -3
View File
@@ -8,9 +8,27 @@ namespace Box\Spout\Reader;
interface SheetInterface interface SheetInterface
{ {
/** /**
* Returns an iterator to iterate over the sheet's rows. * @return IteratorInterface Iterator to iterate over the sheet's rows.
*
* @return IteratorInterface
*/ */
public function getRowIterator(); public function getRowIterator();
/**
* @return int Index of the sheet
*/
public function getIndex();
/**
* @return string Name of the sheet
*/
public function getName();
/**
* @return bool Whether the sheet was defined as active
*/
public function isActive();
/**
* @return bool Whether the sheet is visible
*/
public function isVisible();
} }