- update code generated by PSR-2 standards fixer which introduced PHP 5.4 incompatibilities of 14.7.2013

This commit is contained in:
Uwe.Tews@googlemail.com
2013-07-15 18:18:28 +00:00
parent 00ccae8857
commit 584886cb1c
18 changed files with 80 additions and 77 deletions

View File

@@ -1,4 +1,7 @@
===== trunk ===== ===== trunk =====
15.7.2013
- update code generated by PSR-2 standards fixer which introduced PHP 5.4 incompatibilities of 14.7.2013
14.7.2013 14.7.2013
- bugfix increase of internal maximum parser stacksize to allow more complex tag code {forum topic 24426} - bugfix increase of internal maximum parser stacksize to allow more complex tag code {forum topic 24426}
- update for PHP 5.4 compatibility - update for PHP 5.4 compatibility

View File

@@ -35,7 +35,7 @@ class Smarty_CacheResource_Mysql extends Smarty_CacheResource_Custom
public function __construct() public function __construct()
{ {
try { try {
$this->db = new PDO("mysql:dbname=test;host=127.0.0.1", "smarty", "smarty"); $this->db = new PDO("mysql:dbname=test;host=127.0.0.1", "smarty");
} catch (PDOException $e) { } catch (PDOException $e) {
throw new SmartyException('Mysql Resource failed: ' . $e->getMessage()); throw new SmartyException('Mysql Resource failed: ' . $e->getMessage());
} }

View File

@@ -32,7 +32,7 @@ class Smarty_Resource_Mysql extends Smarty_Resource_Custom
public function __construct() public function __construct()
{ {
try { try {
$this->db = new PDO("mysql:dbname=test;host=127.0.0.1", "smarty", "smarty"); $this->db = new PDO("mysql:dbname=test;host=127.0.0.1", "smarty");
} catch (PDOException $e) { } catch (PDOException $e) {
throw new SmartyException('Mysql Resource failed: ' . $e->getMessage()); throw new SmartyException('Mysql Resource failed: ' . $e->getMessage());
} }

View File

@@ -33,7 +33,7 @@ class Smarty_Resource_Mysqls extends Smarty_Resource_Custom
public function __construct() public function __construct()
{ {
try { try {
$this->db = new PDO("mysql:dbname=test;host=127.0.0.1", "smarty", "smarty"); $this->db = new PDO("mysql:dbname=test;host=127.0.0.1", "smarty");
} catch (PDOException $e) { } catch (PDOException $e) {
throw new SmartyException('Mysql Resource failed: ' . $e->getMessage()); throw new SmartyException('Mysql Resource failed: ' . $e->getMessage());
} }

View File

@@ -167,38 +167,38 @@ class Smarty extends Smarty_Internal_TemplateBase
/** /**
* assigned global tpl vars * assigned global tpl vars
*/ */
static $global_tpl_vars = array(); public static $global_tpl_vars = array();
/** /**
* error handler returned by set_error_hanlder() in Smarty::muteExpectedErrors() * error handler returned by set_error_hanlder() in Smarty::muteExpectedErrors()
*/ */
static $_previous_error_handler = null; public static $_previous_error_handler = null;
/** /**
* contains directories outside of SMARTY_DIR that are to be muted by muteExpectedErrors() * contains directories outside of SMARTY_DIR that are to be muted by muteExpectedErrors()
*/ */
static $_muted_directories = array(); public static $_muted_directories = array();
/** /**
* Flag denoting if Multibyte String functions are available * Flag denoting if Multibyte String functions are available
*/ */
static $_MBSTRING = SMARTY_MBSTRING; public static $_MBSTRING = SMARTY_MBSTRING;
/** /**
* The character set to adhere to (e.g. "UTF-8") * The character set to adhere to (e.g. "UTF-8")
*/ */
static $_CHARSET = SMARTY_RESOURCE_CHAR_SET; public static $_CHARSET = SMARTY_RESOURCE_CHAR_SET;
/** /**
* The date format to be used internally * The date format to be used internally
* (accepts date() and strftime()) * (accepts date() and strftime())
*/ */
static $_DATE_FORMAT = SMARTY_RESOURCE_DATE_FORMAT; public static $_DATE_FORMAT = SMARTY_RESOURCE_DATE_FORMAT;
/** /**
* Flag denoting if PCRE should run in UTF-8 mode * Flag denoting if PCRE should run in UTF-8 mode
*/ */
static $_UTF8_MODIFIER = 'u'; public static $_UTF8_MODIFIER = 'u';
/** /**
* Flag denoting if operating system is windows * Flag denoting if operating system is windows
*/ */
static $_IS_WINDOWS = false; public static $_IS_WINDOWS = false;
/**#@+ /**#@+
* variables * variables
@@ -564,7 +564,7 @@ class Smarty extends Smarty_Internal_TemplateBase
* global internal smarty vars * global internal smarty vars
* @var array * @var array
*/ */
static $_smarty_vars = array(); public static $_smarty_vars = array();
/** /**
* start time for execution time calculation * start time for execution time calculation
* @var int * @var int
@@ -1406,7 +1406,7 @@ class Smarty extends Smarty_Internal_TemplateBase
* @param integer $errno Error level * @param integer $errno Error level
* @return boolean * @return boolean
*/ */
static function mutingErrorHandler($errno, $errstr, $errfile, $errline, $errcontext) public static function mutingErrorHandler($errno, $errstr, $errfile, $errline, $errcontext)
{ {
$_is_muted_directory = false; $_is_muted_directory = false;
@@ -1458,7 +1458,7 @@ class Smarty extends Smarty_Internal_TemplateBase
* *
* @return void * @return void
*/ */
static function muteExpectedErrors() public static function muteExpectedErrors()
{ {
/* /*
error muting is done because some people implemented custom error_handlers using error muting is done because some people implemented custom error_handlers using
@@ -1490,7 +1490,7 @@ class Smarty extends Smarty_Internal_TemplateBase
* *
* @return void * @return void
*/ */
static function unmuteExpectedErrors() public static function unmuteExpectedErrors()
{ {
restore_error_handler(); restore_error_handler();
} }
@@ -1510,7 +1510,7 @@ if (Smarty::$_CHARSET !== 'UTF-8') {
*/ */
class SmartyException extends Exception class SmartyException extends Exception
{ {
static $escape = true; public static $escape = true;
public function __construct($message) public function __construct($message)
{ {
$this->message = self::$escape ? htmlentities($message) : $message; $this->message = self::$escape ? htmlentities($message) : $message;
@@ -1531,7 +1531,7 @@ class SmartyCompilerException extends SmartyException
function smartyAutoload($class) function smartyAutoload($class)
{ {
$_class = strtolower($class); $_class = strtolower($class);
$_classes = array( static $_classes = array(
'smarty_config_source' => true, 'smarty_config_source' => true,
'smarty_config_compiled' => true, 'smarty_config_compiled' => true,
'smarty_security' => true, 'smarty_security' => true,

View File

@@ -160,7 +160,7 @@ class Smarty_Internal_Compile_Block extends Smarty_Internal_CompileBase
* @param string $_name optional name of child block * @param string $_name optional name of child block
* @return string compiled code of schild block * @return string compiled code of schild block
*/ */
static function compileChildBlock($compiler, $_name = null) public static function compileChildBlock($compiler, $_name = null)
{ {
$_output = ''; $_output = '';
// if called by {$smarty.block.child} we must search the name of enclosing {block} // if called by {$smarty.block.child} we must search the name of enclosing {block}

View File

@@ -33,7 +33,7 @@ class Smarty_Internal_Configfilelexer
$this->smarty = $smarty; $this->smarty = $smarty;
$this->mbstring_overload = ini_get('mbstring.func_overload') & 2; $this->mbstring_overload = ini_get('mbstring.func_overload') & 2;
} }
static function &instance($new_instance = null) public static function &instance($new_instance = null)
{ {
static $instance = null; static $instance = null;
if (isset($new_instance) && is_object($new_instance)) if (isset($new_instance) && is_object($new_instance))

View File

@@ -102,7 +102,7 @@ class Smarty_Internal_Configfileparser#line 79 "smarty_internal_configfileparser
$this->smarty = $compiler->smarty; $this->smarty = $compiler->smarty;
$this->compiler = $compiler; $this->compiler = $compiler;
} }
static function &instance($new_instance = null) public static function &instance($new_instance = null)
{ {
static $instance = null; static $instance = null;
if (isset($new_instance) && is_object($new_instance)) if (isset($new_instance) && is_object($new_instance))
@@ -219,7 +219,7 @@ static public $yy_action = array(
/* 20 */ 15, 17, 23, 18, 27, 26, 4, 5, 6, 32, /* 20 */ 15, 17, 23, 18, 27, 26, 4, 5, 6, 32,
/* 30 */ 2, 11, 28, 22, 16, 9, 7, 10, /* 30 */ 2, 11, 28, 22, 16, 9, 7, 10,
); );
static $yy_lookahead = array( public static $yy_lookahead = array(
/* 0 */ 7, 8, 9, 10, 11, 12, 5, 27, 15, 16, /* 0 */ 7, 8, 9, 10, 11, 12, 5, 27, 15, 16,
/* 10 */ 20, 21, 23, 23, 17, 18, 13, 14, 17, 18, /* 10 */ 20, 21, 23, 23, 17, 18, 13, 14, 17, 18,
/* 20 */ 15, 2, 17, 4, 25, 26, 6, 3, 3, 14, /* 20 */ 15, 2, 17, 4, 25, 26, 6, 3, 3, 14,
@@ -227,17 +227,17 @@ static public $yy_action = array(
); );
const YY_SHIFT_USE_DFLT = -8; const YY_SHIFT_USE_DFLT = -8;
const YY_SHIFT_MAX = 19; const YY_SHIFT_MAX = 19;
static $yy_shift_ofst = array( public static $yy_shift_ofst = array(
/* 0 */ -8, 1, 1, 1, -7, -3, -3, 30, -8, -8, /* 0 */ -8, 1, 1, 1, -7, -3, -3, 30, -8, -8,
/* 10 */ -8, 19, 5, 3, 15, 16, 24, 25, 32, 20, /* 10 */ -8, 19, 5, 3, 15, 16, 24, 25, 32, 20,
); );
const YY_REDUCE_USE_DFLT = -21; const YY_REDUCE_USE_DFLT = -21;
const YY_REDUCE_MAX = 10; const YY_REDUCE_MAX = 10;
static $yy_reduce_ofst = array( public static $yy_reduce_ofst = array(
/* 0 */ -10, -1, -1, -1, -20, 10, 12, 8, 14, 7, /* 0 */ -10, -1, -1, -1, -20, 10, 12, 8, 14, 7,
/* 10 */ -11, /* 10 */ -11,
); );
static $yyExpectedTokens = array( public static $yyExpectedTokens = array(
/* 0 */ array(), /* 0 */ array(),
/* 1 */ array(5, 17, 18, ), /* 1 */ array(5, 17, 18, ),
/* 2 */ array(5, 17, 18, ), /* 2 */ array(5, 17, 18, ),
@@ -275,7 +275,7 @@ static public $yy_action = array(
/* 34 */ array(), /* 34 */ array(),
/* 35 */ array(), /* 35 */ array(),
); );
static $yy_default = array( public static $yy_default = array(
/* 0 */ 44, 37, 41, 40, 58, 58, 58, 36, 39, 44, /* 0 */ 44, 37, 41, 40, 58, 58, 58, 36, 39, 44,
/* 10 */ 44, 58, 58, 58, 58, 58, 58, 58, 58, 58, /* 10 */ 44, 58, 58, 58, 58, 58, 58, 58, 58, 58,
/* 20 */ 55, 54, 57, 56, 50, 45, 43, 42, 38, 46, /* 20 */ 55, 54, 57, 56, 50, 45, 43, 42, 38, 46,
@@ -288,9 +288,9 @@ static public $yy_action = array(
const YYERRORSYMBOL = 19; const YYERRORSYMBOL = 19;
const YYERRSYMDT = 'yy0'; const YYERRSYMDT = 'yy0';
const YYFALLBACK = 0; const YYFALLBACK = 0;
static $yyFallback = array( public static $yyFallback = array(
); );
static function Trace($TraceFILE, $zTracePrompt) public static function Trace($TraceFILE, $zTracePrompt)
{ {
if (!$TraceFILE) { if (!$TraceFILE) {
$zTracePrompt = 0; $zTracePrompt = 0;
@@ -301,14 +301,14 @@ static public $yy_action = array(
self::$yyTracePrompt = $zTracePrompt; self::$yyTracePrompt = $zTracePrompt;
} }
static function PrintTrace() public static function PrintTrace()
{ {
self::$yyTraceFILE = fopen('php://output', 'w'); self::$yyTraceFILE = fopen('php://output', 'w');
self::$yyTracePrompt = '<br>'; self::$yyTracePrompt = '<br>';
} }
static $yyTraceFILE; public static $yyTraceFILE;
static $yyTracePrompt; public static $yyTracePrompt;
public $yyidx; /* Index of top element in stack */ public $yyidx; /* Index of top element in stack */
public $yyerrcnt; /* Shifts left before out of the error */ public $yyerrcnt; /* Shifts left before out of the error */
public $yystack = array(); /* The parser's stack */ public $yystack = array(); /* The parser's stack */
@@ -323,7 +323,7 @@ static public $yy_action = array(
'section', 'newline', 'var', 'value', 'section', 'newline', 'var', 'value',
); );
static $yyRuleName = array( public static $yyRuleName = array(
/* 0 */ "start ::= global_vars sections", /* 0 */ "start ::= global_vars sections",
/* 1 */ "global_vars ::= var_list", /* 1 */ "global_vars ::= var_list",
/* 2 */ "sections ::= sections section", /* 2 */ "sections ::= sections section",
@@ -360,7 +360,7 @@ static public $yy_action = array(
} }
} }
static function yy_destructor($yymajor, $yypminor) public static function yy_destructor($yymajor, $yypminor)
{ {
switch ($yymajor) { switch ($yymajor) {
default: break; /* If no destructor action specified: do nothing */ default: break; /* If no destructor action specified: do nothing */
@@ -633,7 +633,7 @@ static public $yy_action = array(
} }
} }
static $yyRuleInfo = array( public static $yyRuleInfo = array(
array( 'lhs' => 20, 'rhs' => 2 ), array( 'lhs' => 20, 'rhs' => 2 ),
array( 'lhs' => 21, 'rhs' => 1 ), array( 'lhs' => 21, 'rhs' => 1 ),
array( 'lhs' => 22, 'rhs' => 2 ), array( 'lhs' => 22, 'rhs' => 2 ),
@@ -658,7 +658,7 @@ static public $yy_action = array(
array( 'lhs' => 25, 'rhs' => 3 ), array( 'lhs' => 25, 'rhs' => 3 ),
); );
static $yyReduceMap = array( public static $yyReduceMap = array(
0 => 0, 0 => 0,
2 => 0, 2 => 0,
3 => 0, 3 => 0,

View File

@@ -22,14 +22,14 @@ class Smarty_Internal_Debug extends Smarty_Internal_Data
* *
* @var array * @var array
*/ */
static $template_data = array(); public static $template_data = array();
/** /**
* Start logging of compile time * Start logging of compile time
* *
* @param object $template * @param object $template
*/ */
static function start_compile($template) public static function start_compile($template)
{ {
$key = self::get_key($template); $key = self::get_key($template);
self::$template_data[$key]['start_time'] = microtime(true); self::$template_data[$key]['start_time'] = microtime(true);
@@ -40,7 +40,7 @@ class Smarty_Internal_Debug extends Smarty_Internal_Data
* *
* @param object $template * @param object $template
*/ */
static function end_compile($template) public static function end_compile($template)
{ {
$key = self::get_key($template); $key = self::get_key($template);
self::$template_data[$key]['compile_time'] += microtime(true) - self::$template_data[$key]['start_time']; self::$template_data[$key]['compile_time'] += microtime(true) - self::$template_data[$key]['start_time'];
@@ -51,7 +51,7 @@ class Smarty_Internal_Debug extends Smarty_Internal_Data
* *
* @param object $template * @param object $template
*/ */
static function start_render($template) public static function start_render($template)
{ {
$key = self::get_key($template); $key = self::get_key($template);
self::$template_data[$key]['start_time'] = microtime(true); self::$template_data[$key]['start_time'] = microtime(true);
@@ -62,7 +62,7 @@ class Smarty_Internal_Debug extends Smarty_Internal_Data
* *
* @param object $template * @param object $template
*/ */
static function end_render($template) public static function end_render($template)
{ {
$key = self::get_key($template); $key = self::get_key($template);
self::$template_data[$key]['render_time'] += microtime(true) - self::$template_data[$key]['start_time']; self::$template_data[$key]['render_time'] += microtime(true) - self::$template_data[$key]['start_time'];
@@ -73,7 +73,7 @@ class Smarty_Internal_Debug extends Smarty_Internal_Data
* *
* @param object $template cached template * @param object $template cached template
*/ */
static function start_cache($template) public static function start_cache($template)
{ {
$key = self::get_key($template); $key = self::get_key($template);
self::$template_data[$key]['start_time'] = microtime(true); self::$template_data[$key]['start_time'] = microtime(true);
@@ -84,7 +84,7 @@ class Smarty_Internal_Debug extends Smarty_Internal_Data
* *
* @param object $template cached template * @param object $template cached template
*/ */
static function end_cache($template) public static function end_cache($template)
{ {
$key = self::get_key($template); $key = self::get_key($template);
self::$template_data[$key]['cache_time'] += microtime(true) - self::$template_data[$key]['start_time']; self::$template_data[$key]['cache_time'] += microtime(true) - self::$template_data[$key]['start_time'];
@@ -95,7 +95,7 @@ class Smarty_Internal_Debug extends Smarty_Internal_Data
* *
* @param Smarty_Internal_Template|Smarty $obj object to debug * @param Smarty_Internal_Template|Smarty $obj object to debug
*/ */
static function display_debug($obj) public static function display_debug($obj)
{ {
// prepare information of assigned variables // prepare information of assigned variables
$ptr = self::get_debug_vars($obj); $ptr = self::get_debug_vars($obj);
@@ -141,7 +141,7 @@ class Smarty_Internal_Debug extends Smarty_Internal_Data
* @param Smarty_Internal_Template|Smarty_Data $obj object to debug * @param Smarty_Internal_Template|Smarty_Data $obj object to debug
* @return StdClass * @return StdClass
*/ */
static function get_debug_vars($obj) public static function get_debug_vars($obj)
{ {
$config_vars = $obj->config_vars; $config_vars = $obj->config_vars;
$tpl_vars = array(); $tpl_vars = array();

View File

@@ -30,7 +30,7 @@ class Smarty_Internal_Filter_Handler
* @param Smarty_Internal_Template $template template object * @param Smarty_Internal_Template $template template object
* @return string the filtered content * @return string the filtered content
*/ */
static function runFilter($type, $content, Smarty_Internal_Template $template) public static function runFilter($type, $content, Smarty_Internal_Template $template)
{ {
$output = $content; $output = $content;
// loop over autoload filters of specified type // loop over autoload filters of specified type

View File

@@ -25,7 +25,7 @@ class Smarty_Internal_Function_Call_Handler
* @param string $_hash nocache hash value * @param string $_hash nocache hash value
* @param bool $_nocache nocache flag * @param bool $_nocache nocache flag
*/ */
static function call($_name, Smarty_Internal_Template $_template, $_params, $_hash, $_nocache) public static function call($_name, Smarty_Internal_Template $_template, $_params, $_hash, $_nocache)
{ {
if ($_nocache) { if ($_nocache) {
$_function = "smarty_template_function_{$_name}_nocache"; $_function = "smarty_template_function_{$_name}_nocache";

View File

@@ -21,7 +21,7 @@ class Smarty_Internal_Get_Include_Path
* @param string $filepath filepath * @param string $filepath filepath
* @return string|boolean full filepath or false * @return string|boolean full filepath or false
*/ */
static function getIncludePath($filepath) public static function getIncludePath($filepath)
{ {
static $_include_path = null; static $_include_path = null;

View File

@@ -27,7 +27,7 @@ class Smarty_Internal_Nocache_Insert
* @param string $_assign optional variable name * @param string $_assign optional variable name
* @return string compiled code * @return string compiled code
*/ */
static function compile($_function, $_attr, $_template, $_script, $_assign = null) public static function compile($_function, $_attr, $_template, $_script, $_assign = null)
{ {
$_output = '<?php '; $_output = '<?php ';
if ($_script != 'null') { if ($_script != 'null') {

View File

@@ -44,7 +44,7 @@ abstract class Smarty_Internal_TemplateCompilerBase
* *
* @var array * @var array
*/ */
static $_tag_objects = array(); public static $_tag_objects = array();
/** /**
* tag stack * tag stack

View File

@@ -118,14 +118,14 @@ class Smarty_Internal_Templateparser#line 79 "smarty_internal_templateparser.php
$this->current_buffer = $this->root_buffer = new _smarty_template_buffer($this); $this->current_buffer = $this->root_buffer = new _smarty_template_buffer($this);
} }
static function escape_start_tag($tag_text) public static function escape_start_tag($tag_text)
{ {
$tag = preg_replace('/\A<\?(.*)\z/', '<<?php ?>?\1', $tag_text, -1 , $count); //Escape tag $tag = preg_replace('/\A<\?(.*)\z/', '<<?php ?>?\1', $tag_text, -1 , $count); //Escape tag
return $tag; return $tag;
} }
static function escape_end_tag($tag_text) public static function escape_end_tag($tag_text)
{ {
return '?<?php ?>>'; return '?<?php ?>>';
} }
@@ -469,7 +469,7 @@ static public $yy_action = array(
/* 2370 */ 329, 329, 329, 329, 329, 329, 329, 329, 329, 329, /* 2370 */ 329, 329, 329, 329, 329, 329, 329, 329, 329, 329,
/* 2380 */ 329, 329, 206, /* 2380 */ 329, 329, 206,
); );
static $yy_lookahead = array( public static $yy_lookahead = array(
/* 0 */ 1, 3, 4, 5, 6, 7, 8, 9, 10, 11, /* 0 */ 1, 3, 4, 5, 6, 7, 8, 9, 10, 11,
/* 10 */ 12, 13, 16, 98, 16, 19, 17, 17, 113, 114, /* 10 */ 12, 13, 16, 98, 16, 19, 17, 17, 113, 114,
/* 20 */ 22, 23, 16, 97, 18, 19, 28, 112, 29, 29, /* 20 */ 22, 23, 16, 97, 18, 19, 28, 112, 29, 29,
@@ -712,7 +712,7 @@ static public $yy_action = array(
); );
const YY_SHIFT_USE_DFLT = -5; const YY_SHIFT_USE_DFLT = -5;
const YY_SHIFT_MAX = 256; const YY_SHIFT_MAX = 256;
static $yy_shift_ofst = array( public static $yy_shift_ofst = array(
/* 0 */ -2, 1271, 1157, 1157, 1271, 1157, 1328, 1328, 1100, 1157, /* 0 */ -2, 1271, 1157, 1157, 1271, 1157, 1328, 1328, 1100, 1157,
/* 10 */ 1157, 1157, 1157, 1157, 1157, 1157, 1499, 1157, 1157, 1157, /* 10 */ 1157, 1157, 1157, 1157, 1157, 1157, 1499, 1157, 1157, 1157,
/* 20 */ 1157, 1157, 1556, 1157, 1157, 1157, 1157, 1157, 1157, 1157, /* 20 */ 1157, 1157, 1556, 1157, 1157, 1157, 1157, 1157, 1157, 1157,
@@ -742,7 +742,7 @@ static public $yy_action = array(
); );
const YY_REDUCE_USE_DFLT = -96; const YY_REDUCE_USE_DFLT = -96;
const YY_REDUCE_MAX = 208; const YY_REDUCE_MAX = 208;
static $yy_reduce_ofst = array( public static $yy_reduce_ofst = array(
/* 0 */ 5, -7, 489, 566, 1630, 856, 70, 1117, 1865, 1854, /* 0 */ 5, -7, 489, 566, 1630, 856, 70, 1117, 1865, 1854,
/* 10 */ 1831, 1812, 1891, 1902, 1977, 1951, 1940, 1921, 1789, 1762, /* 10 */ 1831, 1812, 1891, 1902, 1977, 1951, 1940, 1921, 1789, 1762,
/* 20 */ 1402, 1345, 1288, 1231, 1459, 1516, 1751, 1728, 1709, 1573, /* 20 */ 1402, 1345, 1288, 1231, 1459, 1516, 1751, 1728, 1709, 1573,
@@ -765,7 +765,7 @@ static public $yy_action = array(
/* 190 */ 597, 552, 552, 596, 594, 594, 594, 599, -33, 356, /* 190 */ 597, 552, 552, 596, 594, 594, 594, 599, -33, 356,
/* 200 */ 296, 360, -33, 356, 395, 404, 376, 416, 368, /* 200 */ 296, 360, -33, 356, 395, 404, 376, 416, 368,
); );
static $yyExpectedTokens = array( public static $yyExpectedTokens = array(
/* 0 */ array(3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 16, 22, 23, 28, 32, 33, 34, ), /* 0 */ array(3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 16, 22, 23, 28, 32, 33, 34, ),
/* 1 */ array(16, 18, 19, 22, 23, 28, 32, 33, 34, 36, 38, 41, 56, 57, 58, 59, 60, 63, 64, 78, ), /* 1 */ array(16, 18, 19, 22, 23, 28, 32, 33, 34, 36, 38, 41, 56, 57, 58, 59, 60, 63, 64, 78, ),
/* 2 */ array(16, 18, 19, 22, 23, 28, 32, 33, 34, 36, 38, 41, 56, 57, 58, 59, 60, 63, 64, 78, ), /* 2 */ array(16, 18, 19, 22, 23, 28, 32, 33, 34, 36, 38, 41, 56, 57, 58, 59, 60, 63, 64, 78, ),
@@ -1158,7 +1158,7 @@ static public $yy_action = array(
/* 389 */ array(), /* 389 */ array(),
/* 390 */ array(), /* 390 */ array(),
); );
static $yy_default = array( public static $yy_default = array(
/* 0 */ 394, 578, 549, 549, 595, 549, 595, 595, 595, 595, /* 0 */ 394, 578, 549, 549, 595, 549, 595, 595, 595, 595,
/* 10 */ 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, /* 10 */ 595, 595, 595, 595, 595, 595, 595, 595, 595, 595,
/* 20 */ 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, /* 20 */ 595, 595, 595, 595, 595, 595, 595, 595, 595, 595,
@@ -1207,9 +1207,9 @@ static public $yy_action = array(
const YYERRORSYMBOL = 81; const YYERRORSYMBOL = 81;
const YYERRSYMDT = 'yy0'; const YYERRSYMDT = 'yy0';
const YYFALLBACK = 0; const YYFALLBACK = 0;
static $yyFallback = array( public static $yyFallback = array(
); );
static function Trace($TraceFILE, $zTracePrompt) public static function Trace($TraceFILE, $zTracePrompt)
{ {
if (!$TraceFILE) { if (!$TraceFILE) {
$zTracePrompt = 0; $zTracePrompt = 0;
@@ -1220,14 +1220,14 @@ static public $yy_action = array(
self::$yyTracePrompt = $zTracePrompt; self::$yyTracePrompt = $zTracePrompt;
} }
static function PrintTrace() public static function PrintTrace()
{ {
self::$yyTraceFILE = fopen('php://output', 'w'); self::$yyTraceFILE = fopen('php://output', 'w');
self::$yyTracePrompt = '<br>'; self::$yyTracePrompt = '<br>';
} }
static $yyTraceFILE; public static $yyTraceFILE;
static $yyTracePrompt; public static $yyTracePrompt;
public $yyidx; /* Index of top element in stack */ public $yyidx; /* Index of top element in stack */
public $yyerrcnt; /* Shifts left before out of the error */ public $yyerrcnt; /* Shifts left before out of the error */
public $yystack = array(); /* The parser's stack */ public $yystack = array(); /* The parser's stack */
@@ -1266,7 +1266,7 @@ static public $yy_action = array(
'arrayelement', 'doublequoted', 'doublequotedcontent', 'arrayelement', 'doublequoted', 'doublequotedcontent',
); );
static $yyRuleName = array( public static $yyRuleName = array(
/* 0 */ "start ::= template", /* 0 */ "start ::= template",
/* 1 */ "template ::= template_element", /* 1 */ "template ::= template_element",
/* 2 */ "template ::= template template_element", /* 2 */ "template ::= template template_element",
@@ -1485,7 +1485,7 @@ static public $yy_action = array(
} }
} }
static function yy_destructor($yymajor, $yypminor) public static function yy_destructor($yymajor, $yypminor)
{ {
switch ($yymajor) { switch ($yymajor) {
default: break; /* If no destructor action specified: do nothing */ default: break; /* If no destructor action specified: do nothing */
@@ -1758,7 +1758,7 @@ static public $yy_action = array(
} }
} }
static $yyRuleInfo = array( public static $yyRuleInfo = array(
array( 'lhs' => 82, 'rhs' => 1 ), array( 'lhs' => 82, 'rhs' => 1 ),
array( 'lhs' => 83, 'rhs' => 1 ), array( 'lhs' => 83, 'rhs' => 1 ),
array( 'lhs' => 83, 'rhs' => 2 ), array( 'lhs' => 83, 'rhs' => 2 ),
@@ -1965,7 +1965,7 @@ static public $yy_action = array(
array( 'lhs' => 96, 'rhs' => 0 ), array( 'lhs' => 96, 'rhs' => 0 ),
); );
static $yyReduceMap = array( public static $yyReduceMap = array(
0 => 0, 0 => 0,
1 => 1, 1 => 1,
2 => 1, 2 => 1,

View File

@@ -57,7 +57,7 @@ class Smarty_Internal_Utility
* @param Smarty $smarty Smarty instance * @param Smarty $smarty Smarty instance
* @return integer number of template files compiled * @return integer number of template files compiled
*/ */
static function compileAllTemplates($extension, $force_compile, $time_limit, $max_errors, Smarty $smarty) public static function compileAllTemplates($extension, $force_compile, $time_limit, $max_errors, Smarty $smarty)
{ {
// switch off time limit // switch off time limit
if (function_exists('set_time_limit')) { if (function_exists('set_time_limit')) {
@@ -121,7 +121,7 @@ class Smarty_Internal_Utility
* @param Smarty $smarty Smarty instance * @param Smarty $smarty Smarty instance
* @return integer number of config files compiled * @return integer number of config files compiled
*/ */
static function compileAllConfig($extension, $force_compile, $time_limit, $max_errors, Smarty $smarty) public static function compileAllConfig($extension, $force_compile, $time_limit, $max_errors, Smarty $smarty)
{ {
// switch off time limit // switch off time limit
if (function_exists('set_time_limit')) { if (function_exists('set_time_limit')) {
@@ -180,7 +180,7 @@ class Smarty_Internal_Utility
* @param Smarty $smarty Smarty instance * @param Smarty $smarty Smarty instance
* @return integer number of template files deleted * @return integer number of template files deleted
*/ */
static function clearCompiledTemplate($resource_name, $compile_id, $exp_time, Smarty $smarty) public static function clearCompiledTemplate($resource_name, $compile_id, $exp_time, Smarty $smarty)
{ {
$_compile_dir = $smarty->getCompileDir(); $_compile_dir = $smarty->getCompileDir();
$_compile_id = isset($compile_id) ? preg_replace('![^\w\|]+!', '_', $compile_id) : null; $_compile_id = isset($compile_id) ? preg_replace('![^\w\|]+!', '_', $compile_id) : null;
@@ -275,7 +275,7 @@ class Smarty_Internal_Utility
* @param Smarty_Internal_Template $templae template object * @param Smarty_Internal_Template $templae template object
* @return array of tag/attributes * @return array of tag/attributes
*/ */
static function getTags(Smarty_Internal_Template $template) public static function getTags(Smarty_Internal_Template $template)
{ {
$template->smarty->get_used_tags = true; $template->smarty->get_used_tags = true;
$template->compileTemplateSource(); $template->compileTemplateSource();
@@ -292,7 +292,7 @@ class Smarty_Internal_Utility
* @param array $errors array to push results into rather than outputting them * @param array $errors array to push results into rather than outputting them
* @return bool status, true if everything is fine, false else * @return bool status, true if everything is fine, false else
*/ */
static function testInstall(Smarty $smarty, &$errors=null) public static function testInstall(Smarty $smarty, &$errors=null)
{ {
$status = true; $status = true;

View File

@@ -23,7 +23,7 @@ class Smarty_Internal_Write_File
* @param Smarty $smarty smarty instance * @param Smarty $smarty smarty instance
* @return boolean true * @return boolean true
*/ */
static function writeFile($_filepath, $_contents, Smarty $smarty) public static function writeFile($_filepath, $_contents, Smarty $smarty)
{ {
$_error_reporting = error_reporting(); $_error_reporting = error_reporting();
error_reporting($_error_reporting & ~E_NOTICE & ~E_WARNING); error_reporting($_error_reporting & ~E_NOTICE & ~E_WARNING);

View File

@@ -21,17 +21,17 @@ abstract class Smarty_Resource
* cache for Smarty_Template_Source instances * cache for Smarty_Template_Source instances
* @var array * @var array
*/ */
static $sources = array(); public static $sources = array();
/** /**
* cache for Smarty_Template_Compiled instances * cache for Smarty_Template_Compiled instances
* @var array * @var array
*/ */
static $compileds = array(); public static $compileds = array();
/** /**
* cache for Smarty_Resource instances * cache for Smarty_Resource instances
* @var array * @var array
*/ */
static $resources = array(); public static $resources = array();
/** /**
* resource types provided by the core * resource types provided by the core
* @var array * @var array
@@ -372,7 +372,7 @@ abstract class Smarty_Resource
* @param string $type name of the resource * @param string $type name of the resource
* @return Smarty_Resource Resource Handler * @return Smarty_Resource Resource Handler
*/ */
static function load(Smarty $smarty, $type) public static function load(Smarty $smarty, $type)
{ {
// try smarty's cache // try smarty's cache
if (isset($smarty->_resource_handlers[$type])) { if (isset($smarty->_resource_handlers[$type])) {
@@ -490,7 +490,7 @@ abstract class Smarty_Resource
* @param string $template_resource template_resource to extracate resource handler and name of * @param string $template_resource template_resource to extracate resource handler and name of
* @return string unique resource name * @return string unique resource name
*/ */
static function getUniqueTemplateName($smarty, $template_resource) public static function getUniqueTemplateName($smarty, $template_resource)
{ {
self::parseResourceName($template_resource, $smarty->default_resource_type, $name, $type); self::parseResourceName($template_resource, $smarty->default_resource_type, $name, $type);
// TODO: optimize for Smarty's internal resource types // TODO: optimize for Smarty's internal resource types
@@ -509,7 +509,7 @@ abstract class Smarty_Resource
* @param string $template_resource resource identifier * @param string $template_resource resource identifier
* @return Smarty_Template_Source Source Object * @return Smarty_Template_Source Source Object
*/ */
static function source(Smarty_Internal_Template $_template=null, Smarty $smarty=null, $template_resource=null) public static function source(Smarty_Internal_Template $_template=null, Smarty $smarty=null, $template_resource=null)
{ {
if ($_template) { if ($_template) {
$smarty = $_template->smarty; $smarty = $_template->smarty;
@@ -546,7 +546,7 @@ abstract class Smarty_Resource
* @param Smarty_Internal_Config $_config config object * @param Smarty_Internal_Config $_config config object
* @return Smarty_Config_Source Source Object * @return Smarty_Config_Source Source Object
*/ */
static function config(Smarty_Internal_Config $_config) public static function config(Smarty_Internal_Config $_config)
{ {
static $_incompatible_resources = array('eval' => true, 'string' => true, 'extends' => true, 'php' => true); static $_incompatible_resources = array('eval' => true, 'string' => true, 'extends' => true, 'php' => true);
$config_resource = $_config->config_resource; $config_resource = $_config->config_resource;