/** * * @throws Exceptions\MissingDatabaseConnectionException * @return array */ public static function getTables() { $tables = DatabaseConnectionFactory::get()->query('show tables')->all(); $tableNames = static::extractTableNames($tables); $result = []; if (!empty($tableNames)) { foreach ($tableNames as $tableName) { $result[] = (new Table())->setTable($tableName)->setNameFromTable(); } } return $result; }
public function __construct() { $this->connection = DatabaseConnectionFactory::get(Config::getConfigParam('DatabaseConnection', 'default_profile')); }