1 | <?php |
||
11 | class Worksheet |
||
12 | { |
||
13 | /** @var string Path to the XML file that will contain the sheet data */ |
||
14 | private $filePath; |
||
15 | |||
16 | /** @var Resource Pointer to the sheet data file (e.g. xl/worksheets/sheet1.xml) */ |
||
17 | private $filePointer; |
||
18 | |||
19 | /** @var Sheet The "external" sheet */ |
||
20 | private $externalSheet; |
||
21 | |||
22 | /** @var int Maximum number of columns among all the written rows */ |
||
23 | private $maxNumColumns; |
||
24 | |||
25 | /** @var int Index of the last written row */ |
||
26 | private $lastWrittenRowIndex; |
||
27 | |||
28 | /** |
||
29 | * Worksheet constructor. |
||
30 | * |
||
31 | * @param string $worksheetFilePath |
||
32 | * @param Sheet $externalSheet |
||
33 | */ |
||
34 | 78 | public function __construct($worksheetFilePath, Sheet $externalSheet) |
|
42 | |||
43 | /** |
||
44 | * @return string |
||
45 | */ |
||
46 | 78 | public function getFilePath() |
|
50 | |||
51 | /** |
||
52 | * @return Resource |
||
53 | */ |
||
54 | 8 | public function getFilePointer() |
|
58 | |||
59 | /** |
||
60 | * @param Resource $filePointer |
||
61 | */ |
||
62 | 78 | public function setFilePointer($filePointer) |
|
66 | |||
67 | /** |
||
68 | * @return Sheet |
||
69 | */ |
||
70 | 12 | public function getExternalSheet() |
|
74 | |||
75 | /** |
||
76 | * @return int |
||
77 | */ |
||
78 | 4 | public function getMaxNumColumns() |
|
82 | |||
83 | /** |
||
84 | * @param int $maxNumColumns |
||
85 | */ |
||
86 | public function setMaxNumColumns($maxNumColumns) |
||
87 | { |
||
88 | $this->maxNumColumns = $maxNumColumns; |
||
89 | } |
||
90 | |||
91 | /** |
||
92 | * @return int |
||
93 | */ |
||
94 | public function getLastWrittenRowIndex() |
||
95 | { |
||
96 | return $this->lastWrittenRowIndex; |
||
97 | } |
||
98 | |||
99 | /** |
||
100 | * @param int $lastWrittenRowIndex |
||
101 | */ |
||
102 | public function setLastWrittenRowIndex($lastWrittenRowIndex) |
||
103 | { |
||
104 | $this->lastWrittenRowIndex = $lastWrittenRowIndex; |
||
105 | } |
||
106 | |||
107 | /** |
||
108 | * @return int The ID of the worksheet |
||
109 | */ |
||
110 | 4 | public function getId() |
|
115 | } |