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)

Convert from an old-style database URL to an array of database settings

Parameters

db_url: A Drupal 6 db-url string to convert, or an array with multiple db-urls.

Return value

array An array of database values.

3 calls to drush_sitealias_convert_db_from_db_url()
drush_archive_restore in commands/core/archive.drush.inc
Command callback. Restore web site(s) from a site archive file.
Sql6::getAll in lib/Drush/Sql/Sql6.php
_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 1665
The site alias API.

Code

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

  if (!is_array($db_url)) {
    $result = array('default' => array('default' => drush_convert_db_from_db_url($db_url)));
  }
  else {
    foreach ($db_url as $one_name => $one_db_url) {
      $result[$one_name] = array('default' => drush_convert_db_from_db_url($one_db_url));
    }
  }

  return $result;
}