From 19985dbb8c0aa66dc4bf7905abc1148de909097d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anton=20Luka=20=C5=A0ijanec?= Date: Tue, 11 Jan 2022 12:35:47 +0100 Subject: prvi-commit --- admin/survey/excel/PHPExcel/WorksheetIterator.php | 111 ++++++++++++++++++++++ 1 file changed, 111 insertions(+) create mode 100644 admin/survey/excel/PHPExcel/WorksheetIterator.php (limited to 'admin/survey/excel/PHPExcel/WorksheetIterator.php') diff --git a/admin/survey/excel/PHPExcel/WorksheetIterator.php b/admin/survey/excel/PHPExcel/WorksheetIterator.php new file mode 100644 index 0000000..ad09e76 --- /dev/null +++ b/admin/survey/excel/PHPExcel/WorksheetIterator.php @@ -0,0 +1,111 @@ +_subject = $subject; + } + + /** + * Destructor + */ + public function __destruct() { + unset($this->_subject); + } + + /** + * Rewind iterator + */ + public function rewind() { + $this->_position = 0; + } + + /** + * Current PHPExcel_Worksheet + * + * @return PHPExcel_Worksheet + */ + public function current() { + return $this->_subject->getSheet($this->_position); + } + + /** + * Current key + * + * @return int + */ + public function key() { + return $this->_position; + } + + /** + * Next value + */ + public function next() { + ++$this->_position; + } + + /** + * More PHPExcel_Worksheet instances available? + * + * @return boolean + */ + public function valid() { + return $this->_position < $this->_subject->getSheetCount(); + } +} -- cgit v1.2.3