function drush_sitealias_convert_db_from_db_url

8.0.x sitealias.inc drush_sitealias_convert_db_from_db_url($db_url)
6.x sitealias.inc drush_sitealias_convert_db_from_db_url($db_url)
7.x sitealias.inc drush_sitealias_convert_db_from_db_url($db_url)
3.x sitealias.inc drush_sitealias_convert_db_from_db_url($db_url)
4.x sitealias.inc drush_sitealias_convert_db_from_db_url($db_url)
5.x sitealias.inc drush_sitealias_convert_db_from_db_url($db_url)
master sitealias.inc drush_sitealias_convert_db_from_db_url($db_url)
1 call to drush_sitealias_convert_db_from_db_url()
_drush_sitealias_add_static_defaults in includes/sitealias.inc
Add "static" default values to the given alias record. The difference between a static default and a transient default is that static defaults -always- exist in the alias record, and they are cached, whereas transient defaults are only…

File

includes/sitealias.inc, line 1184
The site alias API.

Code

function drush_sitealias_convert_db_from_db_url($db_url) {
  $result = array();

  if (is_array($db_url)) {
    $default_db = array();

    foreach ($db_url as $db_name => $db_urlstr) {
      $default_db[$db_name] = drush_convert_db_from_db_url($db_urlstr);
    }

    $result['default'] = $default_db;
  }
  else {
    $result = array('default' => array('default' => drush_convert_db_from_db_url($db_url)));
  }

  return $result;
}