protected function FrxSyntaxEngine::get_value in Forena Reports 7.3
Same name and namespace in other branches
- 6.2 FrxSyntaxEngine.inc \FrxSyntaxEngine::get_value()
- 6 FrxSyntaxEngine.inc \FrxSyntaxEngine::get_value()
- 7 FrxSyntaxEngine.inc \FrxSyntaxEngine::get_value()
- 7.2 FrxSyntaxEngine.inc \FrxSyntaxEngine::get_value()
- 7.4 FrxSyntaxEngine.inc \FrxSyntaxEngine::get_value()
Get the value from the data. This is used by token_replace method to extract the data based on the path provided.
Parameters
$data:
$key:
Return value
unknown_type
1 call to FrxSyntaxEngine::get_value()
File
- ./
FrxSyntaxEngine.inc, line 48 - FrXSytnaxEngine defines how regular expression procesing/token substitution takes place. It includes support for passing in a formatter oobject that will escape strings properly before substituting them.
Class
- FrxSyntaxEngine
- @file FrXSytnaxEngine defines how regular expression procesing/token substitution takes place. It includes support for passing in a formatter oobject that will escape strings properly before substituting them.
Code
protected function get_value($key, $raw = FALSE) {
$context = '';
$raw_key = $key;
if ($key && strpos($key, '.')) {
@(list($context, $key) = explode('.', $key, 2));
$o = Frx::Context($context);
}
else {
$o = $this->data;
}
$value = $o
->getValue($key, $context);
if (!$raw && $this->formatter) {
$value = trim($this->formatter
->format($value, $raw_key));
}
return $value;
}