1 | <?php |
||
11 | class Sheet implements SheetInterface |
||
12 | { |
||
13 | /** @var \Box\Spout\Reader\ODS\RowIterator To iterate over sheet's rows */ |
||
14 | protected $rowIterator; |
||
15 | |||
16 | /** @var int ID of the sheet */ |
||
17 | protected $id; |
||
18 | |||
19 | /** @var int Index of the sheet, based on order in the workbook (zero-based) */ |
||
20 | protected $index; |
||
21 | |||
22 | /** @var string Name of the sheet */ |
||
23 | protected $name; |
||
24 | |||
25 | /** @var bool Whether the sheet was the active one */ |
||
26 | protected $isActive; |
||
27 | |||
28 | /** @var bool Whether the sheet is visible */ |
||
29 | protected $isVisible; |
||
30 | |||
31 | /** |
||
32 | * @param RowIterator $rowIterator The corresponding row iterator |
||
33 | * @param int $sheetIndex Index of the sheet, based on order in the workbook (zero-based) |
||
34 | * @param string $sheetName Name of the sheet |
||
35 | * @param bool $isSheetActive Whether the sheet was defined as active |
||
36 | * @param bool $isSheetVisible Whether the sheet is visible |
||
37 | */ |
||
38 | 29 | public function __construct($rowIterator, $sheetIndex, $sheetName, $isSheetActive, $isSheetVisible) |
|
39 | { |
||
40 | 29 | $this->rowIterator = $rowIterator; |
|
41 | 29 | $this->index = $sheetIndex; |
|
42 | 29 | $this->name = $sheetName; |
|
43 | 29 | $this->isActive = $isSheetActive; |
|
44 | 29 | $this->isVisible = $isSheetVisible; |
|
45 | 29 | } |
|
46 | |||
47 | /** |
||
48 | * @return \Box\Spout\Reader\ODS\RowIterator |
||
49 | */ |
||
50 | 26 | public function getRowIterator() |
|
54 | |||
55 | /** |
||
56 | * @return int Index of the sheet, based on order in the workbook (zero-based) |
||
57 | */ |
||
58 | 1 | public function getIndex() |
|
62 | |||
63 | /** |
||
64 | * @return string Name of the sheet |
||
65 | */ |
||
66 | 1 | public function getName() |
|
70 | |||
71 | /** |
||
72 | * @return bool Whether the sheet was defined as active |
||
73 | */ |
||
74 | 2 | public function isActive() |
|
78 | |||
79 | /** |
||
80 | * @return bool Whether the sheet is visible |
||
81 | */ |
||
82 | 1 | public function isVisible() |
|
86 | } |
||
87 |