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 --- inc/lib/Twig/SimpleTest.php | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) (limited to 'inc/lib/Twig/SimpleTest.php') diff --git a/inc/lib/Twig/SimpleTest.php b/inc/lib/Twig/SimpleTest.php index 225459c9..fee5778b 100644 --- a/inc/lib/Twig/SimpleTest.php +++ b/inc/lib/Twig/SimpleTest.php @@ -3,7 +3,7 @@ /* * This file is part of Twig. * - * (c) 2010-2012 Fabien Potencier + * (c) Fabien Potencier * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -12,6 +12,8 @@ /** * Represents a template test. * + * @final + * * @author Fabien Potencier */ class Twig_SimpleTest @@ -25,7 +27,10 @@ class Twig_SimpleTest $this->name = $name; $this->callable = $callable; $this->options = array_merge(array( + 'is_variadic' => false, 'node_class' => 'Twig_Node_Expression_Test', + 'deprecated' => false, + 'alternative' => null, ), $options); } @@ -43,4 +48,26 @@ class Twig_SimpleTest { return $this->options['node_class']; } + + public function isVariadic() + { + return $this->options['is_variadic']; + } + + public function isDeprecated() + { + return (bool) $this->options['deprecated']; + } + + public function getDeprecatedVersion() + { + return $this->options['deprecated']; + } + + public function getAlternative() + { + return $this->options['alternative']; + } } + +class_alias('Twig_SimpleTest', 'Twig\TwigTest', false); -- cgit v1.3