1 <?php
2
3 /**
4 * REX_CONFIG[key=xzy].
5 *
6 * Arguments:
7 * - key
8 * - namespace
9 *
10 * @author gharlan
11 *
12 * @package redaxo\core
13 */
14 class rex_var_config extends rex_var
15 {
16 /**
17 * {@inheritdoc}
18 */
19 protected function getOutput()
20 {
21 $key = $this->getParsedArg('key', null, true);
22 if ($key === null) {
23 return false;
24 }
25 $namespace = $this->getParsedArg('namespace', "'" . rex::CONFIG_NAMESPACE . "'");
26 return 'htmlspecialchars(rex_config::get(' . $namespace . ', ' . $key . '))';
27 }
28 }
29