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