smartyexception.php 460 B

12345678910111213141516171819
  1. <?php
  2. /**
  3. * Smarty exception class
  4. *
  5. * @package Smarty
  6. */
  7. class SmartyException extends Exception
  8. {
  9. public static $escape = false;
  10. public function __construct($message, $code = 400, Exception $previous = null){
  11. parent::__construct($message, 400, $previous);
  12. }
  13. public function __toString()
  14. {
  15. return ' --> Smarty: ' . (self::$escape ? htmlentities($this->message) : $this->message) . ' <-- ';
  16. }
  17. }