diff options
| author | Benjamin Southall <applemansigloo@gmail.com> | 2019-02-26 10:11:12 +1000 |
|---|---|---|
| committer | Benjamin Southall <applemansigloo@gmail.com> | 2019-02-26 10:11:12 +1000 |
| commit | f79395851b044689567e0e6c9504acbcaa742782 (patch) | |
| tree | ee539aee9ffa90e8accd6f130b30a8ebed7a232e /inc/lib/Twig/SimpleFilter.php | |
| parent | 28f32baf0125ca5085266e73dc5071e5814d8e3b (diff) | |
Twig update to latest Twig 1.x legacy as per vichan
Diffstat (limited to 'inc/lib/Twig/SimpleFilter.php')
| -rw-r--r-- | inc/lib/Twig/SimpleFilter.php | 41 |
1 files changed, 34 insertions, 7 deletions
diff --git a/inc/lib/Twig/SimpleFilter.php b/inc/lib/Twig/SimpleFilter.php index d35c5633..ee4c0aeb 100644 --- a/inc/lib/Twig/SimpleFilter.php +++ b/inc/lib/Twig/SimpleFilter.php @@ -3,7 +3,7 @@ /* * This file is part of Twig. * - * (c) 2009-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 filter. * + * @final + * * @author Fabien Potencier <fabien@symfony.com> */ class Twig_SimpleFilter @@ -27,12 +29,15 @@ class Twig_SimpleFilter $this->callable = $callable; $this->options = array_merge(array( 'needs_environment' => false, - 'needs_context' => false, - 'is_safe' => null, - 'is_safe_callback' => null, - 'pre_escape' => null, - 'preserves_safety' => null, - 'node_class' => 'Twig_Node_Expression_Filter', + 'needs_context' => false, + 'is_variadic' => false, + 'is_safe' => null, + 'is_safe_callback' => null, + 'pre_escape' => null, + 'preserves_safety' => null, + 'node_class' => 'Twig_Node_Expression_Filter', + 'deprecated' => false, + 'alternative' => null, ), $options); } @@ -91,4 +96,26 @@ class Twig_SimpleFilter { return $this->options['pre_escape']; } + + 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_SimpleFilter', 'Twig\TwigFilter', false); |
