function Database::getDriverList
Same name in other branches
- 11.x core/lib/Drupal/Core/Database/Database.php \Drupal\Core\Database\Database::getDriverList()
Returns the list provider for available database drivers.
Return value
\Drupal\Core\Extension\DatabaseDriverList The list provider for available database drivers.
File
-
core/
lib/ Drupal/ Core/ Database/ Database.php, line 616
Class
- Database
- Primary front-controller for the database system.
Namespace
Drupal\Core\DatabaseCode
public static function getDriverList() : DatabaseDriverList {
if (\Drupal::hasContainer() && \Drupal::hasService('extension.list.database_driver')) {
return \Drupal::service('extension.list.database_driver');
}
else {
return new DatabaseDriverList(DRUPAL_ROOT, 'database_driver', new NullBackend('database_driver'));
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.