| 
									
										
										
										
											2015-10-24 05:02:24 +02:00
										 |  |  | <?php | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | /** | 
					
						
							| 
									
										
										
										
											2016-08-14 02:38:55 +02:00
										 |  |  |  * Smarty Internal Undefined | 
					
						
							| 
									
										
										
										
											2015-10-24 05:02:24 +02:00
										 |  |  |  * | 
					
						
							| 
									
										
										
										
											2016-08-14 02:38:55 +02:00
										 |  |  |  * Class to handle undefined method calls or calls to obsolete runtime extensions | 
					
						
							| 
									
										
										
										
											2015-10-24 05:02:24 +02:00
										 |  |  |  * | 
					
						
							|  |  |  |  * @package    Smarty | 
					
						
							|  |  |  |  * @subpackage PluginsInternal | 
					
						
							|  |  |  |  * @author     Uwe Tews | 
					
						
							|  |  |  |  */ | 
					
						
							|  |  |  | class Smarty_Internal_Undefined | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     /** | 
					
						
							| 
									
										
										
										
											2016-08-14 02:38:55 +02:00
										 |  |  |      * Name of undefined extension class | 
					
						
							|  |  |  |      * | 
					
						
							|  |  |  |      * @var string|null | 
					
						
							|  |  |  |      */ | 
					
						
							|  |  |  |     public $class = null; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     /** | 
					
						
							|  |  |  |      * Smarty_Internal_Undefined constructor. | 
					
						
							|  |  |  |      * | 
					
						
							|  |  |  |      * @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 | 
					
						
							| 
									
										
										
										
											2015-10-24 05:02:24 +02:00
										 |  |  |      * | 
					
						
							| 
									
										
										
										
											2016-02-09 01:27:15 +01:00
										 |  |  |      * @param  \Smarty_Internal_Template $tpl | 
					
						
							|  |  |  |      * @param  array                     $properties special template properties | 
					
						
							|  |  |  |      * @param  bool                      $cache      flag if called from cache file | 
					
						
							| 
									
										
										
										
											2015-10-24 05:02:24 +02:00
										 |  |  |      * | 
					
						
							| 
									
										
										
										
											2016-08-14 02:38:55 +02:00
										 |  |  |      * @return bool false | 
					
						
							| 
									
										
										
										
											2015-10-24 05:02:24 +02:00
										 |  |  |      */ | 
					
						
							| 
									
										
										
										
											2015-12-27 08:12:46 +01:00
										 |  |  |     public function decodeProperties(Smarty_Internal_Template $tpl, $properties, $cache = false) | 
					
						
							| 
									
										
										
										
											2015-10-24 05:02:24 +02:00
										 |  |  |     { | 
					
						
							|  |  |  |         if ($cache) { | 
					
						
							|  |  |  |             $tpl->cached->valid = false; | 
					
						
							|  |  |  |         } else { | 
					
						
							|  |  |  |             $tpl->mustCompile = true; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  |         return false; | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     /** | 
					
						
							|  |  |  |      * Call error handler for undefined method | 
					
						
							|  |  |  |      * | 
					
						
							|  |  |  |      * @param string $name unknown method-name | 
					
						
							|  |  |  |      * @param array  $args argument array | 
					
						
							|  |  |  |      * | 
					
						
							|  |  |  |      * @return mixed | 
					
						
							|  |  |  |      * @throws SmartyException | 
					
						
							|  |  |  |      */ | 
					
						
							|  |  |  |     public function __call($name, $args) | 
					
						
							|  |  |  |     { | 
					
						
							| 
									
										
										
										
											2016-08-14 02:38:55 +02:00
										 |  |  |         if (isset($this->class)) { | 
					
						
							|  |  |  |             throw new SmartyException("undefined extension class '{$this->class}'"); | 
					
						
							|  |  |  |         } else { | 
					
						
							|  |  |  |             throw new SmartyException(get_class($args[ 0 ]) . "->{$name}() undefined method"); | 
					
						
							|  |  |  |         } | 
					
						
							| 
									
										
										
										
											2015-10-24 05:02:24 +02:00
										 |  |  |     } | 
					
						
							|  |  |  | } |