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_variable.php 911B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. <?php
  2. /**
  3. * class for the Smarty variable object
  4. * This class defines the Smarty variable object
  5. *
  6. * @package Smarty
  7. * @subpackage Template
  8. */
  9. class Smarty_Variable
  10. {
  11. /**
  12. * template variable
  13. *
  14. * @var mixed
  15. */
  16. public $value = null;
  17. /**
  18. * if true any output of this variable will be not cached
  19. *
  20. * @var boolean
  21. */
  22. public $nocache = false;
  23. /**
  24. * create Smarty variable object
  25. *
  26. * @param mixed $value the value to assign
  27. * @param boolean $nocache if true any output of this variable will be not cached
  28. */
  29. public function __construct($value = null, $nocache = false)
  30. {
  31. $this->value = $value;
  32. $this->nocache = $nocache;
  33. }
  34. /**
  35. * <<magic>> String conversion
  36. *
  37. * @return string
  38. */
  39. public function __toString()
  40. {
  41. return (string) $this->value;
  42. }
  43. }