You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

smarty_internal_undefined.php 1.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. <?php
  2. /**
  3. * Smarty Method AppendByRef
  4. *
  5. * Smarty::appendByRef() method
  6. *
  7. * @package Smarty
  8. * @subpackage PluginsInternal
  9. * @author Uwe Tews
  10. */
  11. class Smarty_Internal_Undefined
  12. {
  13. /**
  14. * This function is executed automatically when a compiled or cached template file is included
  15. * - Decode saved properties from compiled template and cache files
  16. * - Check if compiled or cache file is valid
  17. *
  18. * @param array $properties special template properties
  19. * @param bool $cache flag if called from cache file
  20. *
  21. * @return bool flag if compiled or cache file is valid
  22. */
  23. public function decodeProperties($tpl, $properties, $cache = false)
  24. {
  25. if ($cache) {
  26. $tpl->cached->valid = false;
  27. } else {
  28. $tpl->mustCompile = true;
  29. }
  30. return false;
  31. }
  32. /**
  33. * Call error handler for undefined method
  34. *
  35. * @param string $name unknown method-name
  36. * @param array $args argument array
  37. *
  38. * @return mixed
  39. * @throws SmartyException
  40. */
  41. public function __call($name, $args)
  42. {
  43. throw new SmartyException(get_class($args[0]) . "->{$name}() undefined method");
  44. }
  45. }