protected static function Database::getDatabaseDriverNamespace in Drupal 9
Same name and namespace in other branches
- 8 core/lib/Drupal/Core/Database/Database.php \Drupal\Core\Database\Database::getDatabaseDriverNamespace()
Gets the PHP namespace of a database driver from the connection info.
Parameters
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 value
string The PHP namespace of the driver's database.
Deprecated
in drupal:9.1.0 and is removed from drupal:10.0.0. There is no replacement as $connection_info['namespace'] is always set.
See also
https://www.drupal.org/node/3127769
File
- core/
lib/ Drupal/ Core/ Database/ Database.php, line 639
Class
- Database
- Primary front-controller for the database system.
Namespace
Drupal\Core\DatabaseCode
protected static function getDatabaseDriverNamespace(array $connection_info) {
@trigger_error(__METHOD__ . " is deprecated in drupal:9.1.0 and is removed from drupal:10.0.0. There is no replacement as \$connection_info['namespace'] is always set. See https://www.drupal.org/node/3127769.", E_USER_DEPRECATED);
if (isset($connection_info['namespace'])) {
return $connection_info['namespace'];
}
// Fallback for Drupal 7 settings.php.
return 'Drupal\\Core\\Database\\Driver\\' . $connection_info['driver'];
}