public function FrxRepoMan::load_provider in Forena Reports 7.4
Same name and namespace in other branches
- 7.3 FrxRepoMan.inc \FrxRepoMan::load_provider()
Load the data provider class based on the class name.
Parameters
string $name:
Return value
object The data provider object
1 call to FrxRepoMan::load_provider()
File
- ./
FrxRepoMan.inc, line 116 - FrxRepoMan.inc Enter description here ... @author davidmetzler
Class
- FrxRepoMan
- @file FrxRepoMan.inc Enter description here ... @author davidmetzler
Code
public function load_provider($conf, $repo_path, $repos_name) {
@($name = isset($conf['data provider']) ? $conf['data provider'] : $conf['data_engine']);
Frx::plugins('FrxDataSource');
// Instantiate the path
if (class_exists($name)) {
$o = new $name($conf, $repo_path, $repos_name);
return $o;
}
else {
Frx::error('Data provider not found for ' . $conf['title']);
}
}