class Sql7

  1. 8.0.x lib/Drush/Sql/Sql7.php Sql7
  2. 7.x lib/Drush/Sql/Sql7.php Sql7
  3. master lib/Drush/Sql/Sql7.php Sql7

Namespace

Drush\Sql

Hierarchy

Expanded class hierarchy of Sql7

Members

Contains filters are case sensitive

File

lib/Drush/Sql/Sql7.php, line 5

View source
class Sql7 extends SqlVersion {
  public function get_db_spec() {
    $db_spec = NULL;
    drush_sql_bootstrap_database_configuration();
    $database = drush_get_option('database', 'default');
    $target = drush_get_option('target', 'default');
    // We don't use DB API here `sql-sync` would have to messily addConnection.
    if (!isset($GLOBALS['databases']) || !array_key_exists($database, $GLOBALS['databases']) || !array_key_exists($target, $GLOBALS['databases'][$database])) {
      // Do nothing
    }
    else {
      $db_spec = $GLOBALS['databases'][$database][$target];
    }
    return $db_spec;
  }

  public function getAll() {
    if (isset($GLOBALS['databases'])) {
      return $GLOBALS['databases'];
    }
  }
}