Sql7.php

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

Namespace

Drush\Sql

Classes

Namesort descending Description
Sql7

File

lib/Drush/Sql/Sql7.php
View source
  1. <?php
  2. namespace Drush\Sql;
  3. class Sql7 extends SqlVersion {
  4. public function get_db_spec() {
  5. $db_spec = NULL;
  6. drush_sql_bootstrap_database_configuration();
  7. $database = drush_get_option('database', 'default');
  8. $target = drush_get_option('target', 'default');
  9. // We don't use DB API here `sql-sync` would have to messily addConnection.
  10. if (!isset($GLOBALS['databases']) || !array_key_exists($database, $GLOBALS['databases']) || !array_key_exists($target, $GLOBALS['databases'][$database])) {
  11. // Do nothing
  12. }
  13. else {
  14. $db_spec = $GLOBALS['databases'][$database][$target];;
  15. }
  16. return $db_spec;
  17. }
  18. public function getAll() {
  19. if (isset($GLOBALS['databases'])) {
  20. return $GLOBALS['databases'];
  21. }
  22. }
  23. }