getPDO(); $tableQuery = $pdo->prepare('show full tables'); $tableQuery->execute(); $tables = $tableQuery->fetchAll(PDO::FETCH_ASSOC); foreach ($tables as $table) { $name = reset($table); $this->tables[$name] = new MysqlTableReflection($db, $name); } } public function getAllTables(): array { return $this->tables; } public function getTable(string $name): ?TableReflectionInterface { return $this->tables[$name] ?? null; } }