1 | <?php |
||
5 | class Row |
||
6 | { |
||
7 | /** |
||
8 | * The cells in this row |
||
9 | * @var Cell[] |
||
10 | */ |
||
11 | protected $cells = []; |
||
12 | |||
13 | /** |
||
14 | * Row constructor. |
||
15 | * @param Cell[] $cells |
||
16 | */ |
||
17 | 97 | public function __construct(array $cells) |
|
21 | |||
22 | /** |
||
23 | * @return Cell[] $cells |
||
24 | */ |
||
25 | 65 | public function getCells() |
|
26 | { |
||
27 | 65 | return $this->cells; |
|
28 | } |
||
29 | |||
30 | /** |
||
31 | * @param Cell[] $cells |
||
32 | * @return Row |
||
33 | */ |
||
34 | 97 | public function setCells(array $cells) |
|
43 | |||
44 | /** |
||
45 | * @param Cell $cell |
||
46 | * @param mixed $cellIndex |
||
47 | * @parma int $cellIndex |
||
48 | * @return Row |
||
49 | */ |
||
50 | 35 | public function setCellAtIndex(Cell $cell, $cellIndex) |
|
56 | |||
57 | /** |
||
58 | * @param Cell $cell |
||
59 | * @return Row |
||
60 | */ |
||
61 | 73 | public function addCell(Cell $cell) |
|
67 | |||
68 | /** |
||
69 | * @return int |
||
70 | */ |
||
71 | 52 | public function getNumCells() |
|
75 | |||
76 | /** |
||
77 | * @return array The row values, as array |
||
78 | */ |
||
79 | public function toArray() |
||
85 | } |
||
86 |