diff options
author | emkael <emkael@tlen.pl> | 2018-10-18 02:40:38 +0200 |
---|---|---|
committer | emkael <emkael@tlen.pl> | 2018-10-18 02:40:38 +0200 |
commit | eab8a101e7a3fcbb41e01a574985e06c5a3775de (patch) | |
tree | 60f201da5984b0c3638d10da02bba42b61aa3177 /lib/smarty3/sysplugins/smarty_internal_undefined.php | |
parent | 7f38be342c1495aeca418286c15c25c18ac9e142 (diff) |
Updating Smarty
Diffstat (limited to 'lib/smarty3/sysplugins/smarty_internal_undefined.php')
-rw-r--r-- | lib/smarty3/sysplugins/smarty_internal_undefined.php | 40 |
1 files changed, 29 insertions, 11 deletions
diff --git a/lib/smarty3/sysplugins/smarty_internal_undefined.php b/lib/smarty3/sysplugins/smarty_internal_undefined.php index 23563e0..7df0acc 100644 --- a/lib/smarty3/sysplugins/smarty_internal_undefined.php +++ b/lib/smarty3/sysplugins/smarty_internal_undefined.php @@ -1,9 +1,9 @@ <?php /** - * Smarty Method AppendByRef + * Smarty Internal Undefined * - * Smarty::appendByRef() method + * Class to handle undefined method calls or calls to obsolete runtime extensions * * @package Smarty * @subpackage PluginsInternal @@ -11,17 +11,31 @@ */ class Smarty_Internal_Undefined { + /** + * Name of undefined extension class + * + * @var string|null + */ + public $class = null; /** - * This function is executed automatically when a compiled or cached template file is included - * - Decode saved properties from compiled template and cache files - * - Check if compiled or cache file is valid + * Smarty_Internal_Undefined constructor. * - * @param \Smarty_Internal_Template $tpl - * @param array $properties special template properties - * @param bool $cache flag if called from cache file + * @param null|string $class name of undefined extension class + */ + public function __construct($class = null) + { + $this->class = $class; + } + + /** + * Wrapper for obsolete class Smarty_Internal_Runtime_ValidateCompiled + * + * @param \Smarty_Internal_Template $tpl + * @param array $properties special template properties + * @param bool $cache flag if called from cache file * - * @return bool flag if compiled or cache file is valid + * @return bool false */ public function decodeProperties(Smarty_Internal_Template $tpl, $properties, $cache = false) { @@ -44,6 +58,10 @@ class Smarty_Internal_Undefined */ public function __call($name, $args) { - throw new SmartyException(get_class($args[ 0 ]) . "->{$name}() undefined method"); + if (isset($this->class)) { + throw new SmartyException("undefined extension class '{$this->class}'"); + } else { + throw new SmartyException(get_class($args[ 0 ]) . "->{$name}() undefined method"); + } } -}
\ No newline at end of file +} |