| 1 | <?php |
||
| 13 | class Document |
||
| 14 | { |
||
| 15 | /** |
||
| 16 | * @var string[] |
||
| 17 | */ |
||
| 18 | protected static $allowedTypes = ['numeric', 'nominal', 'string', 'date']; |
||
| 19 | |||
| 20 | /** |
||
| 21 | * @var string |
||
| 22 | */ |
||
| 23 | protected $name; |
||
| 24 | |||
| 25 | /** |
||
| 26 | * @var ColumnInterface[] |
||
| 27 | */ |
||
| 28 | protected $columns = []; |
||
| 29 | |||
| 30 | /** |
||
| 31 | * @var array |
||
| 32 | */ |
||
| 33 | protected $data = []; |
||
| 34 | |||
| 35 | /** |
||
| 36 | * @param string $name Name of the relation |
||
| 37 | */ |
||
| 38 | 1 | public function __construct($name) |
|
| 42 | |||
| 43 | /** |
||
| 44 | * @return string |
||
| 45 | */ |
||
| 46 | 1 | public function getName() |
|
| 50 | |||
| 51 | /** |
||
| 52 | * @param ColumnInterface $column |
||
| 53 | * |
||
| 54 | * @return Document |
||
| 55 | */ |
||
| 56 | 1 | public function addColumn(ColumnInterface $column) |
|
| 62 | |||
| 63 | /** |
||
| 64 | * @return ColumnInterface[] |
||
| 65 | */ |
||
| 66 | 1 | public function getColumns() |
|
| 70 | |||
| 71 | /** |
||
| 72 | * @param array $row |
||
| 73 | * |
||
| 74 | * @return Document |
||
| 75 | */ |
||
| 76 | 2 | public function addData(array $row) |
|
| 87 | |||
| 88 | /** |
||
| 89 | * @return array |
||
| 90 | */ |
||
| 91 | 2 | public function getData() |
|
| 95 | } |
||
| 96 |