public function DataManager::createDataSource in Forena Reports 8
Load the driver class based on the class name.
Parameters
string $name:
Return value
\Drupal\forena\FrxPlugin\Driver\DriverBase The data provider object
1 call to DataManager::createDataSource()
File
- src/
DataManager.php, line 143 - DataManager.inc Enter description here ... @author davidmetzler
Class
Namespace
Drupal\forenaCode
public function createDataSource($conf, $repo_path, $repos_name) {
$o = NULL;
@($name = $conf['driver']);
$drivers = $this->drivers;
// Instantiate the Data Driver object.
if (isset($drivers[$name]) && class_exists($drivers[$name])) {
$fileSystem = new DataFileSystem($name, $repo_path, $this);
$class = $drivers[$name];
$o = new $class($repos_name, $conf, $fileSystem);
}
else {
AppService::instance()
->error('Driver not found for ' . $conf['title']);
}
return $o;
}