- load seldom used Smarty API methods dynamically to reduce memory footprint

This commit is contained in:
uwetews
2015-08-17 21:52:32 +02:00
parent eb7aa8fe92
commit 6cbcdf4d7b
65 changed files with 2552 additions and 1536 deletions
@@ -2093,13 +2093,13 @@ class Smarty_Internal_Templateparser
#line 879 "../smarty/lexer/smarty_internal_templateparser.y"
function yy_r116()
{
$this->_retvalue = '$_smarty_tpl->getConfigVariable( \'' . $this->yystack[$this->yyidx + - 1]->minor . '\')';
$this->_retvalue = '$_smarty_tpl->_getConfigVariable( \'' . $this->yystack[$this->yyidx + - 1]->minor . '\')';
}
#line 883 "../smarty/lexer/smarty_internal_templateparser.y"
function yy_r117()
{
$this->_retvalue = '(is_array($tmp = $_smarty_tpl->getConfigVariable( \'' .
$this->_retvalue = '(is_array($tmp = $_smarty_tpl->_getConfigVariable( \'' .
$this->yystack[$this->yyidx + - 2]->minor . '\')) ? $tmp' . $this->yystack[$this->yyidx + 0]->minor .
' :null)';
}
@@ -2107,13 +2107,13 @@ class Smarty_Internal_Templateparser
#line 887 "../smarty/lexer/smarty_internal_templateparser.y"
function yy_r118()
{
$this->_retvalue = '$_smarty_tpl->getConfigVariable( ' . $this->yystack[$this->yyidx + - 1]->minor . ')';
$this->_retvalue = '$_smarty_tpl->_getConfigVariable( ' . $this->yystack[$this->yyidx + - 1]->minor . ')';
}
#line 891 "../smarty/lexer/smarty_internal_templateparser.y"
function yy_r119()
{
$this->_retvalue = '(is_array($tmp = $_smarty_tpl->getConfigVariable( ' .
$this->_retvalue = '(is_array($tmp = $_smarty_tpl->_getConfigVariable( ' .
$this->yystack[$this->yyidx + - 2]->minor . ')) ? $tmp' . $this->yystack[$this->yyidx + 0]->minor .
' : null)';
}
@@ -2332,7 +2332,7 @@ class Smarty_Internal_Templateparser
$this->compiler->trigger_template_error('Illegal number of paramer in "isset()"');
}
$par = implode(',', $this->yystack[$this->yyidx + - 1]->minor);
if (strncasecmp($par, '$_smarty_tpl->getConfigVariable', strlen('$_smarty_tpl->getConfigVariable')) ===
if (strncasecmp($par, '$_smarty_tpl->_getConfigVariable', strlen('$_smarty_tpl->_getConfigVariable')) ===
0
) {
self::$prefix_number ++;