| 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 | 71 | public function __construct(array $cells) |
|
| 21 | |||
| 22 | /** |
||
| 23 | * @return Cell[] $cells |
||
| 24 | */ |
||
| 25 | 43 | public function getCells() |
|
| 26 | { |
||
| 27 | 43 | return $this->cells; |
|
| 28 | } |
||
| 29 | |||
| 30 | /** |
||
| 31 | * @param Cell[] $cells |
||
| 32 | * @return Row |
||
| 33 | */ |
||
| 34 | 71 | public function setCells(array $cells) |
|
| 43 | |||
| 44 | /** |
||
| 45 | * @param Cell $cell |
||
| 46 | * @parma int $cellIndex |
||
| 47 | * @return Row |
||
| 48 | */ |
||
| 49 | 35 | public function setCellAtIndex(Cell $cell, $cellIndex) |
|
| 55 | |||
| 56 | /** |
||
| 57 | * @param Cell $cell |
||
| 58 | * @return Row |
||
| 59 | */ |
||
| 60 | 48 | public function addCell(Cell $cell) |
|
| 66 | |||
| 67 | /** |
||
| 68 | * @return array The row values, as array |
||
| 69 | */ |
||
| 70 | public function toArray() |
||
| 76 | } |
||
| 77 |