public function FrxData::setValue in Forena Reports 7.4
Same name and namespace in other branches
- 6.2 FrxData.inc \FrxData::setValue()
- 7.2 FrxData.inc \FrxData::setValue()
- 7.3 FrxData.inc \FrxData::setValue()
Allows override of a value for the current context.
Parameters
String $key:
String $value:
Overrides FrxContext::setValue
File
- ./
FrxData.inc, line 232
Class
Code
public function setValue($key, $value, $context = '') {
if (is_array($this->cur_context)) {
$this->cur_context[$key] = $value;
if ($this->cur_context_xml) {
$this->cur_context_xml->{$key} = $value;
}
}
elseif (is_object($this->cur_context)) {
if (strpos($key, '@') === 0) {
$this->cur_context[trim($key, '@')] = $value;
}
else {
$this->cur_context->{$key} = $value;
}
}
}