public function FrxRenderer::replaceTokens in Forena Reports 7.4
Same name and namespace in other branches
- 6.2 FrxRenderer.inc \FrxRenderer::replaceTokens()
- 7.2 FrxRenderer.inc \FrxRenderer::replaceTokens()
- 7.3 FrxRenderer.inc \FrxRenderer::replaceTokens()
A helper function to allow replacement of tokens from inside a renderer wihout needing to understand the object
Parameters
unknown $text:
string $raw_mode Field:
Return value
Ambigous <unknown_type, text, mixed, string, unknown>
1 call to FrxRenderer::replaceTokens()
- FrxSVGGraph::renderGraph in renderers/
FrxSVGGraph.inc
File
- renderers/
FrxRenderer.inc, line 64 - FrxRenderer.inc Base class for Frx custom renderers @author davidmetzler
Class
- FrxRenderer
- @file FrxRenderer.inc Base class for Frx custom renderers @author davidmetzler
Code
public function replaceTokens($text, $raw_mode = FALSE) {
if (is_array($text)) {
foreach ($text as $k => $v) {
$text[$k] = $this
->replaceTokens($v, $raw_mode);
}
return $text;
}
elseif (is_object($text)) {
foreach ($text as $k => $v) {
$text->{$k} = $this
->replaceTokens($v, $raw_mode);
}
return $text;
}
else {
return $this->teng
->replace($text, $raw_mode);
}
}