| 7 database.inc | public DatabaseConnection::getDriverClass($class, array $files = array(), $use_autoload = FALSE) |
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 761 - Core systems for the database layer.
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];
}
Login or register to post comments