gehe zur Dokumentation dieser Datei
28 public function compile($args, $compiler, $parameter)
30 $_index = preg_split(
"/\]\[/", substr($parameter, 1, strlen($parameter) - 2));
32 $variable = trim($_index[0],
"'");
33 if (!isset($compiler->smarty->security_policy) || $compiler->smarty->security_policy->isTrustedSpecialSmartyVar($variable, $compiler)) {
36 $name = trim($_index[1],
"'");
37 $foreachVar =
"'__foreach_{$name}'";
38 return "(isset(\$_smarty_tpl->tpl_vars[$foreachVar]->value[{$_index[2]}]) ? \$_smarty_tpl->tpl_vars[$foreachVar]->value[{$_index[2]}] : null)";
40 return "\$_smarty_tpl->getVariable('smarty')->value$parameter";
42 return "Smarty::\$_smarty_vars$parameter";
46 if (isset($compiler->smarty->security_policy) && !$compiler->smarty->security_policy->allow_super_globals) {
47 $compiler->trigger_template_error(
"(secure mode) super globals not permitted");
50 $compiled_ref =
'$_COOKIE';
59 if (isset($compiler->smarty->security_policy) && !$compiler->smarty->security_policy->allow_super_globals) {
60 $compiler->trigger_template_error(
"(secure mode) super globals not permitted");
63 $compiled_ref =
'$_' . strtoupper($variable);
67 return 'basename($_smarty_tpl->source->filepath)';
69 case 'template_object':
70 return '$_smarty_tpl';
73 return 'dirname($_smarty_tpl->source->filepath)';
81 if (isset($compiler->smarty->security_policy) && !$compiler->smarty->security_policy->allow_constants) {
82 $compiler->trigger_template_error(
"(secure mode) constants not permitted");
85 if (strpos($_index[1],
'$') ===
false && strpos($_index[1],
'\'') ===
false ) {
86 return "@constant('{$_index[1]}')";
88 return "@constant({$_index[1]})";
92 if (isset($_index[2])) {
93 return "(is_array(\$tmp = \$_smarty_tpl->getConfigVariable($_index[1])) ? \$tmp[$_index[2]] : null)";
95 return "\$_smarty_tpl->getConfigVariable($_index[1])";
98 $_ldelim = $compiler->smarty->left_delimiter;
103 $_rdelim = $compiler->smarty->right_delimiter;
108 $compiler->trigger_template_error(
'$smarty.' . trim($_index[0],
"'") .
' is invalid');
111 if (isset($_index[1])) {
112 array_shift($_index);
113 foreach ($_index as $_ind) {
114 $compiled_ref = $compiled_ref .
"[$_ind]";
118 return $compiled_ref;
Sie sind hier: Home » MyOOS Benutzerhandbuch » Smarty
Korrekturen, Hinweise und Ergänzungen
Bitte scheuen Sie sich nicht und melden Sie, was auf dieser Seite sachlich falsch oder irreführend ist, was ergänzt werden sollte, was fehlt usw. Dazu bitte oben aus dem Menü Seite den Eintrag
Support Forum wählen. Es ist eine kostenlose Anmeldung erforderlich, um Anmerkungen zu posten. Unpassende Postings, Spam usw. werden kommentarlos entfernt.