diff options
| author | czaks <marcin@6irc.net> | 2013-08-05 06:03:40 -0400 |
|---|---|---|
| committer | czaks <marcin@6irc.net> | 2013-08-05 06:03:40 -0400 |
| commit | a84c4510fccfdc0cfb6f187633daea10dc70f326 (patch) | |
| tree | 6077f5211196ae40cac0184bb7cc67b81d320b0b /inc/lib/Twig/Function.php | |
| parent | 33c7abf11f3a9b5c0964a2d7a25533c2849dbc78 (diff) | |
| parent | a8327c3a37fd22d2aa5d63061c9d3eaa30ae425a (diff) | |
Merge branch 'master' of github.com:vichan-devel/Tinyboard
Conflicts:
js/post-hider.js
Diffstat (limited to 'inc/lib/Twig/Function.php')
| -rw-r--r-- | inc/lib/Twig/Function.php | 25 |
1 files changed, 22 insertions, 3 deletions
diff --git a/inc/lib/Twig/Function.php b/inc/lib/Twig/Function.php index 1197924a..b5ffb2b0 100644 --- a/inc/lib/Twig/Function.php +++ b/inc/lib/Twig/Function.php @@ -12,21 +12,35 @@ /** * Represents a template function. * - * @package twig - * @author Fabien Potencier <fabien@symfony.com> + * Use Twig_SimpleFunction instead. + * + * @author Fabien Potencier <fabien@symfony.com> + * @deprecated since 1.12 (to be removed in 2.0) */ -abstract class Twig_Function implements Twig_FunctionInterface +abstract class Twig_Function implements Twig_FunctionInterface, Twig_FunctionCallableInterface { protected $options; + protected $arguments = array(); public function __construct(array $options = array()) { $this->options = array_merge(array( 'needs_environment' => false, 'needs_context' => false, + 'callable' => null, ), $options); } + public function setArguments($arguments) + { + $this->arguments = $arguments; + } + + public function getArguments() + { + return $this->arguments; + } + public function needsEnvironment() { return $this->options['needs_environment']; @@ -49,4 +63,9 @@ abstract class Twig_Function implements Twig_FunctionInterface return array(); } + + public function getCallable() + { + return $this->options['callable']; + } } |
