function DatabaseConnection::getDriverClass

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.

File

includes/database/database.inc, line 841

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];
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.