1 | <?php |
||
13 | class Worksheet |
||
14 | { |
||
15 | /** @var string Path to the XML file that will contain the sheet data */ |
||
16 | private $filePath; |
||
17 | |||
18 | /** @var Resource Pointer to the sheet data file (e.g. xl/worksheets/sheet1.xml) */ |
||
19 | private $filePointer; |
||
20 | |||
21 | /** @var Sheet The "external" sheet */ |
||
22 | private $externalSheet; |
||
23 | |||
24 | /** @var int Maximum number of columns among all the written rows */ |
||
25 | private $maxNumColumns; |
||
26 | |||
27 | /** @var int Index of the last written row */ |
||
28 | private $lastWrittenRowIndex; |
||
29 | |||
30 | /** |
||
31 | * Worksheet constructor. |
||
32 | * |
||
33 | * @param string $worksheetFilePath |
||
34 | * @param Sheet $externalSheet |
||
35 | */ |
||
36 | 89 | public function __construct($worksheetFilePath, Sheet $externalSheet) |
|
44 | |||
45 | /** |
||
46 | * @return string |
||
47 | */ |
||
48 | 89 | public function getFilePath() |
|
52 | |||
53 | /** |
||
54 | * @return Resource |
||
55 | */ |
||
56 | 70 | public function getFilePointer() |
|
60 | |||
61 | /** |
||
62 | * @param Resource $filePointer |
||
63 | */ |
||
64 | 89 | public function setFilePointer($filePointer) |
|
68 | |||
69 | /** |
||
70 | * @return Sheet |
||
71 | */ |
||
72 | 72 | public function getExternalSheet() |
|
76 | |||
77 | /** |
||
78 | * @return int |
||
79 | */ |
||
80 | 65 | public function getMaxNumColumns() |
|
84 | |||
85 | /** |
||
86 | * @param int $maxNumColumns |
||
87 | */ |
||
88 | 61 | public function setMaxNumColumns($maxNumColumns) |
|
92 | |||
93 | /** |
||
94 | * @return int |
||
95 | */ |
||
96 | 64 | public function getLastWrittenRowIndex() |
|
100 | |||
101 | /** |
||
102 | * @param int $lastWrittenRowIndex |
||
103 | */ |
||
104 | 61 | public function setLastWrittenRowIndex($lastWrittenRowIndex) |
|
108 | |||
109 | /** |
||
110 | * @return int The ID of the worksheet |
||
111 | */ |
||
112 | 36 | public function getId() |
|
117 | } |