* updated Twig to the latest version in 1.x series (v1.35.0)

This commit is contained in:
slawkens1
2017-12-25 13:02:46 +01:00
parent 6528a4a60c
commit 8b4eccc064
198 changed files with 4132 additions and 1977 deletions

View File

@@ -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 function.
*
* @final
*
* @author Fabien Potencier <fabien@symfony.com>
*/
class Twig_SimpleFunction
@@ -32,6 +34,8 @@ class Twig_SimpleFunction
'is_safe' => null,
'is_safe_callback' => null,
'node_class' => 'Twig_Node_Expression_Function',
'deprecated' => false,
'alternative' => null,
), $options);
}
@@ -87,4 +91,21 @@ class Twig_SimpleFunction
{
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_SimpleFunction', 'Twig\TwigFunction', false);