Sql8.php

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

Namespace

Drush\Sql

Classes

Namesort descending Description
Sql8

File

lib/Drush/Sql/Sql8.php
View source
  1. <?php
  2. namespace Drush\Sql;
  3. use Drupal\Core\Database\Database;
  4. class Sql8 extends Sql7 {
  5. public function get_db_spec() {
  6. $db_spec = NULL;
  7. if (drush_bootstrap_max(DRUSH_BOOTSTRAP_DRUPAL_CONFIGURATION)) {
  8. $database = drush_get_option('database', 'default');
  9. $target = drush_get_option('target', 'default');
  10. if ($info = Database::getConnectionInfo($database)) {
  11. return $info[$target];
  12. }
  13. }
  14. return $db_spec;
  15. }
  16. public function getAll() {
  17. return Database::getAllConnectionInfo();
  18. }
  19. }