| 1 | <?php |
||
| 7 | class ArrayDataSource |
||
| 8 | { |
||
| 9 | private $dataSource; |
||
| 10 | |||
| 11 | /** |
||
| 12 | * array( |
||
| 13 | * tableName => ( |
||
| 14 | * array( |
||
| 15 | * columnName => value, anotherColumnName => value |
||
| 16 | * ), |
||
| 17 | * another row |
||
| 18 | * ), |
||
| 19 | * another table |
||
| 20 | * ). |
||
| 21 | * |
||
| 22 | * @param array $dataSource |
||
| 23 | */ |
||
| 24 | public function __construct(array $dataSource) |
||
| 28 | |||
| 29 | public function getTableNames(): array |
||
| 38 | |||
| 39 | public function getTableData(string $tableName, bool $sort = false) |
||
| 54 | |||
| 55 | private function sortData(array $data): array |
||
| 73 | } |
||
| 74 |