public function FrxFiles::data in Forena Reports 6
Same name and namespace in other branches
- 6.2 plugins/FrxFiles.inc \FrxFiles::data()
- 7 plugins/FrxFiles.inc \FrxFiles::data()
- 7.2 plugins/FrxFiles.inc \FrxFiles::data()
File
- plugins/FrxFiles.inc, line 26
- File class for loading raw xml files as Sample data
This class is used as a reference implementation of a data engine, but is
also used to provide sample data files and reports.
@author metzlerd
Class
- FrxFiles
- @file
File class for loading raw xml files as Sample data
This class is used as a reference implementation of a data engine, but is
also used to provide sample data files and reports.
@author metzlerd
Code
public function data($block_name, $parm_data = '', $subQuery = '') {
$block = $this
->load_block($block_name);
$xml = '';
if ($block['source'] && $this
->access($block['access'])) {
try {
$xmlData = $block['source'];
$xml = new SimpleXMLElement($xmlData);
} catch (Exception $e) {
forena_error("Error processing xml\n", $e
->getMessage() . "\n" . $xmlData);
}
}
return $xml;
}