mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-05 02:44:27 +02:00
allow objects in arbitrary param positions
This commit is contained in:
@@ -149,11 +149,10 @@ class Smarty_Compiler extends Smarty {
|
|||||||
// $foo->bar->foo->bar()
|
// $foo->bar->foo->bar()
|
||||||
$this->_obj_ext_regexp = '\->(?:\$?' . $this->_dvar_guts_regexp . ')';
|
$this->_obj_ext_regexp = '\->(?:\$?' . $this->_dvar_guts_regexp . ')';
|
||||||
$this->_obj_params_regexp = '\((?:\w+|(?:'
|
$this->_obj_params_regexp = '\((?:\w+|(?:'
|
||||||
. $this->_var_regexp . '(?:' . $this->_obj_ext_regexp
|
. $this->_var_regexp . '(?:' . $this->_obj_ext_regexp . '(?:\((?:' . $this->_var_regexp
|
||||||
. '(?:\((?:' . $this->_var_regexp
|
. '(?:\s*,\s*' . $this->_var_regexp . ')*)?\))?)*)(?:\s*,\s*(?:(?:\w+|'
|
||||||
. '(?:\s*,\s*' . $this->_var_regexp
|
. $this->_var_regexp . '(?:' . $this->_obj_ext_regexp . '(?:\((?:' . $this->_var_regexp
|
||||||
. ')*)?\))?)*)(?:\s*,\s*(?:(?:\w+|'
|
. '(?:\s*,\s*' . $this->_var_regexp . ')*)?\))?))))*)?\)';
|
||||||
. $this->_var_regexp . ')))*)?\)';
|
|
||||||
$this->_obj_start_regexp = '(?:' . $this->_dvar_regexp . '(?:' . $this->_obj_ext_regexp . ')+)';
|
$this->_obj_start_regexp = '(?:' . $this->_dvar_regexp . '(?:' . $this->_obj_ext_regexp . ')+)';
|
||||||
$this->_obj_call_regexp = '(?:' . $this->_obj_start_regexp . '(?:' . $this->_obj_params_regexp . ')?)';
|
$this->_obj_call_regexp = '(?:' . $this->_obj_start_regexp . '(?:' . $this->_obj_params_regexp . ')?)';
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user