| 1 | <?php |
||
| 22 | class Row extends DataContainer |
||
| 23 | { |
||
| 24 | /** |
||
| 25 | * @var array |
||
| 26 | */ |
||
| 27 | protected $attributes = []; |
||
| 28 | |||
| 29 | /** |
||
| 30 | * @var integer |
||
| 31 | */ |
||
| 32 | protected $type = EnumRowType::Body; |
||
| 33 | |||
| 34 | /** |
||
| 35 | * Overrides the set method from DataContainer to ensure only Cells can be added |
||
| 36 | * |
||
| 37 | * @throws \InvalidArgumentException |
||
| 38 | */ |
||
| 39 | public function set($key, $value) |
||
| 48 | |||
| 49 | /** |
||
| 50 | * Returns the attributes of this Row |
||
| 51 | * |
||
| 52 | * @return array |
||
| 53 | */ |
||
| 54 | public function getAttributes() |
||
| 58 | |||
| 59 | /** |
||
| 60 | * Sets the atributes of the Row |
||
| 61 | * |
||
| 62 | * @param array $newAttributes |
||
| 63 | * |
||
| 64 | * @return $this |
||
| 65 | */ |
||
| 66 | public function setAttributes(array $newAttributes) |
||
| 72 | |||
| 73 | /** |
||
| 74 | * Returns the type of the row as defined by EnumRowType |
||
| 75 | * |
||
| 76 | * @return integer |
||
| 77 | */ |
||
| 78 | public function getType() |
||
| 82 | |||
| 83 | /** |
||
| 84 | * Sets the type of the row. Should be a value from EnumRowType |
||
| 85 | * |
||
| 86 | * @param integer $type |
||
| 87 | * |
||
| 88 | * @return $this |
||
| 89 | */ |
||
| 90 | public function setType($type) |
||
| 96 | } |
||
| 97 |