- $db_url = $db_info['default']['driver'] . '://' . $user . $db_info['default']['host'];
- if (isset($db_info['default']['port'])) {
- $db_url .= ':' . $db_info['default']['port'];
- }
- $db_url .= '/' . $db_info['default']['database'];
- }
- if ($db_info['default']['prefix']['default']) {
- $db_url .= '#' . $db_info['default']['prefix']['default'];
+ /**
+ * Gets the PHP namespace of a database driver from the connection info.
+ *
+ * @param array $connection_info
+ * The database connection information, as defined in settings.php. The
+ * structure of this array depends on the database driver it is connecting
+ * to.
+ *
+ * @return string
+ * The PHP namespace of the driver's database.
+ */
+ protected static function getDatabaseDriverNamespace(array $connection_info) {
+ if (isset($connection_info['namespace'])) {
+ return $connection_info['namespace'];