protected function FrxSyntaxEngine::get_value in Forena Reports 7.4
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.3 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
string $key: Key name used to access data.
bool $raw: True implies that value will not be formatted. Defaults to FALSE.
Return value
string Value of the data
1 call to FrxSyntaxEngine::get_value()
File
- ./
FrxSyntaxEngine.inc, line 57 - 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 ($this->tpattern == FRX_TOKEN_EXP && $this->htmlencode) {
$value = htmlentities($value, NULL, 'UTF-8');
}
if ($this->formatter) {
$value = $this->formatter
->format($value, $raw_key, $raw);
}
return $value;
}