Total Complexity | 3 |
Total Lines | 53 |
Duplicated Lines | 0 % |
Coverage | 75% |
Changes | 0 |
1 | <?php |
||
7 | abstract class CellIterator implements \Iterator |
||
8 | { |
||
9 | /** |
||
10 | * Worksheet to iterate. |
||
11 | * |
||
12 | * @var Worksheet |
||
13 | */ |
||
14 | protected $worksheet; |
||
15 | |||
16 | /** |
||
17 | * Iterate only existing cells. |
||
18 | * |
||
19 | * @var bool |
||
20 | */ |
||
21 | protected $onlyExistingCells = false; |
||
22 | |||
23 | /** |
||
24 | * Destructor. |
||
25 | */ |
||
26 | 15 | public function __destruct() |
|
27 | { |
||
28 | 15 | unset($this->worksheet); |
|
29 | 15 | } |
|
30 | |||
31 | /** |
||
32 | * Get loop only existing cells. |
||
33 | * |
||
34 | * @return bool |
||
35 | */ |
||
36 | public function getIterateOnlyExistingCells() |
||
39 | } |
||
40 | |||
41 | /** |
||
42 | * Validate start/end values for "IterateOnlyExistingCells" mode, and adjust if necessary. |
||
43 | * |
||
44 | * @throws PhpSpreadsheetException |
||
45 | */ |
||
46 | abstract protected function adjustForExistingOnlyRange(); |
||
47 | |||
48 | /** |
||
49 | * Set the iterator to loop only existing cells. |
||
50 | * |
||
51 | * @param bool $value |
||
52 | * |
||
53 | * @throws PhpSpreadsheetException |
||
54 | */ |
||
55 | 1 | public function setIterateOnlyExistingCells($value) |
|
60 | 1 | } |
|
61 | } |
||
62 |