PluginProbe
Visualizer – Tables & Charts Manager with Built-in AI Generator / 3.5.0
Visualizer – Tables & Charts Manager with Built-in AI Generator v3.5.0
4.0.8 4.0.7 4.0.6 4.0.5 4.0.4 4.0.3 3.0.5 3.0.6 3.0.7 3.0.8 3.0.9 3.1.0 3.1.1 3.1.2 3.1.3 3.10.0 3.10.1 3.10.10 3.10.11 3.10.12 3.10.13 3.10.14 3.10.15 3.10.2 3.10.3 All 149 releases
visualizer / vendor / phpoffice / phpspreadsheet / src / PhpSpreadsheet / Worksheet / CellIterator.php

CellIterator.php in Visualizer – Tables & Charts Manager with Built-in AI Generator 3.5.0, at vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/CellIterator.php

62 lines 1.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace PhpOffice\PhpSpreadsheet\Worksheet;
4
5 use PhpOffice\PhpSpreadsheet\Exception as PhpSpreadsheetException;
6
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 public function __destruct()
27 {
28 unset($this->worksheet);
29 }
30
31 /**
32 * Get loop only existing cells.
33 *
34 * @return bool
35 */
36 public function getIterateOnlyExistingCells()
37 {
38 return $this->onlyExistingCells;
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 public function setIterateOnlyExistingCells($value)
56 {
57 $this->onlyExistingCells = (bool) $value;
58
59 $this->adjustForExistingOnlyRange();
60 }
61 }
62