1<?php 2 3/* 4 * This file is part of Twig. 5 * 6 * (c) Fabien Potencier 7 * 8 * For the full copyright and license information, please view the LICENSE 9 * file that was distributed with this source code. 10 */ 11 12namespace Twig\Sandbox; 13 14/** 15 * Exception thrown when a not allowed tag is used in a template. 16 * 17 * @author Martin Hasoň <martin.hason@gmail.com> 18 */ 19class SecurityNotAllowedTagError extends SecurityError 20{ 21 private $tagName; 22 23 public function __construct($message, $tagName, $lineno = -1, $filename = null, \Exception $previous = null) 24 { 25 parent::__construct($message, $lineno, $filename, $previous); 26 $this->tagName = $tagName; 27 } 28 29 public function getTagName() 30 { 31 return $this->tagName; 32 } 33} 34 35class_alias('Twig\Sandbox\SecurityNotAllowedTagError', 'Twig_Sandbox_SecurityNotAllowedTagError'); 36