Esempio n. 1
0
 /**
  *
  * @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;
 }
Esempio n. 2
0
 public function __construct()
 {
     $this->connection = DatabaseConnectionFactory::get(Config::getConfigParam('DatabaseConnection', 'default_profile'));
 }