blob: 02d306360baddcdaa5c839daa7d998474ff95f62 [file] [log] [blame]
Matthias Andreas Benkard12a57352021-12-28 18:02:04 +01001<?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 filter is used in a template.
16 *
17 * @author Martin HasoĊˆ <martin.hason@gmail.com>
18 */
19final class SecurityNotAllowedFilterError extends SecurityError
20{
21 private $filterName;
22
23 public function __construct(string $message, string $functionName)
24 {
25 parent::__construct($message);
26 $this->filterName = $functionName;
27 }
28
29 public function getFilterName(): string
30 {
31 return $this->filterName;
32 }
33}