forked from drush-ops/drush
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSql7.php
26 lines (23 loc) · 763 Bytes
/
Sql7.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
<?php
namespace Drush\Sql;
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'];
}
}
}