| 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 |
namespace ElementorDeps\Twig\Sandbox; |
| 12 |
|
| 13 |
/** |
| 14 |
* Exception thrown when a not allowed function is used in a template. |
| 15 |
* |
| 16 |
* @author Martin Hasoň <martin.hason@gmail.com> |
| 17 |
*/ |
| 18 |
final class SecurityNotAllowedFunctionError extends SecurityError |
| 19 |
{ |
| 20 |
private $functionName; |
| 21 |
public function __construct(string $message, string $functionName) |
| 22 |
{ |
| 23 |
parent::__construct($message); |
| 24 |
$this->functionName = $functionName; |
| 25 |
} |
| 26 |
public function getFunctionName() : string |
| 27 |
{ |
| 28 |
return $this->functionName; |
| 29 |
} |
| 30 |
} |
| 31 |
|