| 1 | <?php |
||
| 8 | trait CommonsTrait |
||
| 9 | { |
||
| 10 | private $scheme; |
||
| 11 | private $pdo; |
||
| 12 | |||
| 13 | public function __construct(PDO $pdo) |
||
| 17 | |||
| 18 | /** |
||
| 19 | * @see SchemeInterface |
||
| 20 | */ |
||
| 21 | public function toArray(): array |
||
| 31 | |||
| 32 | /** |
||
| 33 | * @see SchemeInterface |
||
| 34 | */ |
||
| 35 | public function getTables(): array |
||
| 47 | |||
| 48 | /** |
||
| 49 | * @see SchemeInterface |
||
| 50 | */ |
||
| 51 | public function getTableFields(string $table): array |
||
| 59 | |||
| 60 | /** |
||
| 61 | * Return all tables. |
||
| 62 | */ |
||
| 63 | abstract protected function loadTables(): array; |
||
| 64 | |||
| 65 | /** |
||
| 66 | * Return the scheme of a table. |
||
| 67 | */ |
||
| 68 | abstract protected function loadTableFields(string $table): array; |
||
| 69 | } |
||
| 70 |