51 static $_is_legal_scope = array(
'local' =>
true,
'parent' =>
true,
'root' =>
true,
'global' =>
true);
55 if ($_attr[
'nocache'] ===
true) {
56 $compiler->trigger_template_error(
'nocache option not allowed', $compiler->lex->taglineno);
61 $conf_file = $_attr[
'file'];
62 if (isset($_attr[
'section'])) {
63 $section = $_attr[
'section'];
69 if (isset($_attr[
'scope'])) {
70 $_attr[
'scope'] = trim($_attr[
'scope'],
"'\"");
71 if (isset($_is_legal_scope[$_attr[
'scope']])) {
72 $scope = $_attr[
'scope'];
74 $compiler->trigger_template_error(
'illegal value for "scope" attribute', $compiler->lex->taglineno);
78 $_output =
"<?php \$_config = new Smarty_Internal_Config($conf_file, \$_smarty_tpl->smarty, \$_smarty_tpl);";
79 $_output .=
"\$_config->loadConfigVars($section, '$scope'); ?>";
getAttributes($compiler, $attributes)
This function checks if the attributes passed are valid.
compile($args, $compiler)
Compiles code for the {config_load} tag.