コード例 #1
0
ファイル: Database.php プロジェクト: soneritics/database
 /**
  *
  * @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;
 }
コード例 #2
0
ファイル: ConnectionWrapper.php プロジェクト: laiello/msgr
 public function __construct()
 {
     $this->connection = DatabaseConnectionFactory::get(Config::getConfigParam('DatabaseConnection', 'default_profile'));
 }