You are here

protected function MySQLiSource::_getTables in Backup and Migrate 8.4

Get a list of tables in the db.

Overrides DatabaseSource::_getTables

1 call to MySQLiSource::_getTables()
MySQLiSource::exportToFile in lib/backup_migrate_core/src/Source/MySQLiSource.php
Export this source to the given temp file. This should be the main back up function for this source.

File

lib/backup_migrate_core/src/Source/MySQLiSource.php, line 306

Class

MySQLiSource
Class MySQLiSource.

Namespace

BackupMigrate\Core\Source

Code

protected function _getTables() {
  $out = [];

  // get auto_increment values and names of all tables.
  $tables = $this
    ->query("SHOW TABLE STATUS");
  while ($tables && ($table = $tables
    ->fetch_assoc())) {

    // Lowercase the keys for consistency.
    $table = array_change_key_case($table);
    $out[$table['name']] = $table;
  }
  return $out;
}