1.20.x install.inc backdrop_load_database_driver($driver)

Returns all supported database installer objects that are compiled into PHP.

Return value

An array of database installer objects compiled into PHP.:

File

includes/install.inc, line 252
API functions for installing modules and themes.

Code

function backdrop_load_database_driver($driver) {
  // Because we have no registry yet, we need to include the install.inc file
  // for the driver explicitly.
  require_once BACKDROP_ROOT . '/core/includes/database/database.inc';

  $installer = db_installer_object($driver);
  if ($installer->installable()) {
    return $installer;
  }

  return FALSE;
}