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_undefined_variable.php 642B

12345678910111213141516171819202122232425262728293031323334353637
  1. <?php
  2. /**
  3. * class for undefined variable object
  4. * This class defines an object for undefined variable handling
  5. *
  6. * @package Smarty
  7. * @subpackage Template
  8. */
  9. class Smarty_Undefined_Variable
  10. {
  11. /**
  12. * Returns FALSE for 'nocache' and NULL otherwise.
  13. *
  14. * @param string $name
  15. *
  16. * @return bool
  17. */
  18. public function __get($name)
  19. {
  20. if ($name == 'nocache') {
  21. return false;
  22. } else {
  23. return null;
  24. }
  25. }
  26. /**
  27. * Always returns an empty string.
  28. *
  29. * @return string
  30. */
  31. public function __toString()
  32. {
  33. return "";
  34. }
  35. }