You are here

public function DatabaseConnection::getDriverClass in Drupal 7

Gets the driver-specific override class if any for the specified class.

Parameters

string $class: The class for which we want the potentially driver-specific class.

array $files: The name of the files in which the driver-specific class can be.

$use_autoload: If TRUE, attempt to load classes using PHP's autoload capability as well as the manual approach here.

Return value

string The name of the class that should be used for this driver.

8 calls to DatabaseConnection::getDriverClass()
DatabaseConnection::delete in includes/database/database.inc
Prepares and returns a DELETE query object.
DatabaseConnection::insert in includes/database/database.inc
Prepares and returns an INSERT query object.
DatabaseConnection::merge in includes/database/database.inc
Prepares and returns a MERGE query object.
DatabaseConnection::schema in includes/database/database.inc
Returns a DatabaseSchema object for manipulating the schema.
DatabaseConnection::select in includes/database/database.inc
Prepares and returns a SELECT query object.

... See full list

File

includes/database/database.inc, line 841
Core systems for the database layer.

Class

DatabaseConnection
Base Database API class.

Code

public function getDriverClass($class, array $files = array(), $use_autoload = FALSE) {
  if (empty($this->driverClasses[$class])) {
    $driver = $this
      ->driver();
    $this->driverClasses[$class] = $class . '_' . $driver;
    Database::loadDriverFile($driver, $files);
    if (!class_exists($this->driverClasses[$class], $use_autoload)) {
      $this->driverClasses[$class] = $class;
    }
  }
  return $this->driverClasses[$class];
}