protected static function Database::getDatabaseDriverNamespace in Drupal 8
Same name and namespace in other branches
- 9 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.
2 calls to Database::getDatabaseDriverNamespace()
- Database::getConnectionInfoAsUrl in core/
lib/ Drupal/ Core/ Database/ Database.php - Gets database connection info as a URL.
- Database::openConnection in core/
lib/ Drupal/ Core/ Database/ Database.php - Opens a connection to the server specified by the given key and target.
File
- core/
lib/ Drupal/ Core/ Database/ Database.php, line 632
Class
- Database
- Primary front-controller for the database system.
Namespace
Drupal\Core\DatabaseCode
protected static function getDatabaseDriverNamespace(array $connection_info) {
if (isset($connection_info['namespace'])) {
return $connection_info['namespace'];
}
// Fallback for Drupal 7 settings.php.
return 'Drupal\\Core\\Database\\Driver\\' . $connection_info['driver'];
}