From f79395851b044689567e0e6c9504acbcaa742782 Mon Sep 17 00:00:00 2001 From: Benjamin Southall Date: Tue, 26 Feb 2019 10:11:12 +1000 Subject: Twig update to latest Twig 1.x legacy as per vichan --- .../Twig/Sandbox/SecurityNotAllowedMethodError.php | 40 ++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 inc/lib/Twig/Sandbox/SecurityNotAllowedMethodError.php (limited to 'inc/lib/Twig/Sandbox/SecurityNotAllowedMethodError.php') diff --git a/inc/lib/Twig/Sandbox/SecurityNotAllowedMethodError.php b/inc/lib/Twig/Sandbox/SecurityNotAllowedMethodError.php new file mode 100644 index 00000000..93012fe9 --- /dev/null +++ b/inc/lib/Twig/Sandbox/SecurityNotAllowedMethodError.php @@ -0,0 +1,40 @@ + + */ +class Twig_Sandbox_SecurityNotAllowedMethodError extends Twig_Sandbox_SecurityError +{ + private $className; + private $methodName; + + public function __construct($message, $className, $methodName, $lineno = -1, $filename = null, Exception $previous = null) + { + parent::__construct($message, $lineno, $filename, $previous); + $this->className = $className; + $this->methodName = $methodName; + } + + public function getClassName() + { + return $this->className; + } + + public function getMethodName() + { + return $this->methodName; + } +} + +class_alias('Twig_Sandbox_SecurityNotAllowedMethodError', 'Twig\Sandbox\SecurityNotAllowedMethodError', false); -- cgit v1.3