SecurityNotAllowedFunctionError.php 788 B

1234567891011121314151617181920212223242526272829303132
  1. <?php
  2. /*
  3. * This file is part of Twig.
  4. *
  5. * (c) 2009 Fabien Potencier
  6. *
  7. * For the full copyright and license information, please view the LICENSE
  8. * file that was distributed with this source code.
  9. */
  10. /**
  11. * Exception thrown when a not allowed function is used in a template.
  12. *
  13. * @author Martin Hasoň <martin.hason@gmail.com>
  14. */
  15. class Twig_Sandbox_SecurityNotAllowedFunctionError extends Twig_Sandbox_SecurityError
  16. {
  17. private $functionName;
  18. public function __construct($message, $functionName, $lineno = -1, $filename = null, Exception $previous = null)
  19. {
  20. parent::__construct($message, $lineno, $filename, $previous);
  21. $this->functionName = $functionName;
  22. }
  23. public function getFunctionName()
  24. {
  25. return $this->functionName;
  26. }
  27. }