* Loads and returns a database instance with the specified type and library.
* @param string $type database type of the driver (mysqli, pgsql, mssql, sqldrv, oci, etc.)
* @param string $library database library of the driver (native, pdo, etc.)
+ * @param boolean $external true if this is an external database
* @return moodle_database driver object or null if error
*/
- public static function get_driver_instance($type, $library) {
+ public static function get_driver_instance($type, $library, $external = false) {
global $CFG;
$classname = $type.'_'.$library.'_moodle_database';
}
require_once($libfile);
- return new $classname();
+ return new $classname($external);
}
/**