← All changes
|
vendor/phpoffice/phpexcel/Classes/PHPExcel/WorksheetIterator.php
+23
-13
3.1.2
→
3.0.10
View file →
| @@ -1,10 +1,9 @@ | ||
| 1 | 1 | <?php |
| 2 | - | |
| 3 | 2 | /** |
| 4 | - * PHPExcel_WorksheetIterator | |
| 3 | + * PHPExcel | |
| 5 | 4 | * |
| 6 | - * Copyright (c) 2006 - 2015 PHPExcel | |
| 5 | + * Copyright (c) 2006 - 2014 PHPExcel | |
| 7 | 6 | * |
| 8 | 7 | * This library is free software; you can redistribute it and/or |
| 9 | 8 | * modify it under the terms of the GNU Lesser General Public |
| 10 | 9 | * License as published by the Free Software Foundation; either |
| @@ -20,12 +19,23 @@ | ||
| 20 | 19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
| 21 | 20 | * |
| 22 | 21 | * @category PHPExcel |
| 23 | 22 | * @package PHPExcel |
| 24 | - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) | |
| 23 | + * @copyright Copyright (c) 2006 - 2014 PHPExcel (http://www.codeplex.com/PHPExcel) | |
| 25 | 24 | * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL |
| 26 | 25 | * @version ##VERSION##, ##DATE## |
| 27 | 26 | */ |
| 27 | + | |
| 28 | + | |
| 29 | +/** | |
| 30 | + * PHPExcel_WorksheetIterator | |
| 31 | + * | |
| 32 | + * Used to iterate worksheets in PHPExcel | |
| 33 | + * | |
| 34 | + * @category PHPExcel | |
| 35 | + * @package PHPExcel | |
| 36 | + * @copyright Copyright (c) 2006 - 2014 PHPExcel (http://www.codeplex.com/PHPExcel) | |
| 37 | + */ | |
| 28 | 38 | class PHPExcel_WorksheetIterator implements Iterator |
| 29 | 39 | { |
| 30 | 40 | /** |
| 31 | 41 | * Spreadsheet to iterate |
| @@ -31,9 +41,9 @@ | ||
| 31 | 41 | * Spreadsheet to iterate |
| 32 | 42 | * |
| 33 | 43 | * @var PHPExcel |
| 34 | 44 | */ |
| 35 | - private $subject; | |
| 45 | + private $_subject; | |
| 36 | 46 | |
| 37 | 47 | /** |
| 38 | 48 | * Current iterator position |
| 39 | 49 | * |
| @@ -38,9 +48,9 @@ | ||
| 38 | 48 | * Current iterator position |
| 39 | 49 | * |
| 40 | 50 | * @var int |
| 41 | 51 | */ |
| 42 | - private $position = 0; | |
| 52 | + private $_position = 0; | |
| 43 | 53 | |
| 44 | 54 | /** |
| 45 | 55 | * Create a new worksheet iterator |
| 46 | 56 | * |
| @@ -48,9 +58,9 @@ | ||
| 48 | 58 | */ |
| 49 | 59 | public function __construct(PHPExcel $subject = null) |
| 50 | 60 | { |
| 51 | 61 | // Set subject |
| 52 | - $this->subject = $subject; | |
| 62 | + $this->_subject = $subject; | |
| 53 | 63 | } |
| 54 | 64 | |
| 55 | 65 | /** |
| 56 | 66 | * Destructor |
| @@ -56,9 +66,9 @@ | ||
| 56 | 66 | * Destructor |
| 57 | 67 | */ |
| 58 | 68 | public function __destruct() |
| 59 | 69 | { |
| 60 | - unset($this->subject); | |
| 70 | + unset($this->_subject); | |
| 61 | 71 | } |
| 62 | 72 | |
| 63 | 73 | /** |
| 64 | 74 | * Rewind iterator |
| @@ -64,9 +74,9 @@ | ||
| 64 | 74 | * Rewind iterator |
| 65 | 75 | */ |
| 66 | 76 | public function rewind() |
| 67 | 77 | { |
| 68 | - $this->position = 0; | |
| 78 | + $this->_position = 0; | |
| 69 | 79 | } |
| 70 | 80 | |
| 71 | 81 | /** |
| 72 | 82 | * Current PHPExcel_Worksheet |
| @@ -74,9 +84,9 @@ | ||
| 74 | 84 | * @return PHPExcel_Worksheet |
| 75 | 85 | */ |
| 76 | 86 | public function current() |
| 77 | 87 | { |
| 78 | - return $this->subject->getSheet($this->position); | |
| 88 | + return $this->_subject->getSheet($this->_position); | |
| 79 | 89 | } |
| 80 | 90 | |
| 81 | 91 | /** |
| 82 | 92 | * Current key |
| @@ -84,9 +94,9 @@ | ||
| 84 | 94 | * @return int |
| 85 | 95 | */ |
| 86 | 96 | public function key() |
| 87 | 97 | { |
| 88 | - return $this->position; | |
| 98 | + return $this->_position; | |
| 89 | 99 | } |
| 90 | 100 | |
| 91 | 101 | /** |
| 92 | 102 | * Next value |
| @@ -92,9 +102,9 @@ | ||
| 92 | 102 | * Next value |
| 93 | 103 | */ |
| 94 | 104 | public function next() |
| 95 | 105 | { |
| 96 | - ++$this->position; | |
| 106 | + ++$this->_position; | |
| 97 | 107 | } |
| 98 | 108 | |
| 99 | 109 | /** |
| 100 | 110 | * More PHPExcel_Worksheet instances available? |
| @@ -102,7 +112,7 @@ | ||
| 102 | 112 | * @return boolean |
| 103 | 113 | */ |
| 104 | 114 | public function valid() |
| 105 | 115 | { |
| 106 | - return $this->position < $this->subject->getSheetCount(); | |
| 116 | + return $this->_position < $this->_subject->getSheetCount(); | |
| 107 | 117 | } |
| 108 | 118 | } |