public function FrxData::currentContextArray in Forena Reports 7.4
Same name and namespace in other branches
- 7.3 FrxData.inc \FrxData::currentContextArray()
Return current context as key value pairs Enter description here
File
- ./
FrxData.inc, line 64
Class
Code
public function currentContextArray() {
$data = $this->cur_context;
if (is_array($data)) {
return $data;
}
$ret = array();
if (is_object($data)) {
// Get attributes
$ret = get_object_vars($data);
if (method_exists($data, 'attributes')) {
foreach ($data
->attributes() as $key => $value) {
$ret[$key] = (string) $value;
}
}
}
else {
$ret = (array) $data;
}
return $ret;
}