From c4e80ee525735a3a58138a0c9537936affe96637 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Wed, 26 May 2010 11:26:38 +0200 Subject: [PATCH] added Twig_FilterInterface --- CHANGELOG | 2 +- lib/Twig/Filter.php | 4 +--- lib/Twig/FilterInterface.php | 22 ++++++++++++++++++++++ 3 files changed, 24 insertions(+), 4 deletions(-) create mode 100644 lib/Twig/FilterInterface.php diff --git a/CHANGELOG b/CHANGELOG index c80757f..00f4346 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -3,7 +3,7 @@ Backward incompatibilities: * The short notation of the `block` tag changed. - * added two interfaces: Twig_NodeInterface and Twig_TokenParserInterface + * added three interfaces: Twig_NodeInterface, Twig_TokenParserInterface, and Twig_FilterInterface * changed the generated code to match the new coding standards * fixed sandbox mode (__toString() method check was not enforced if called implicitly from a simple statement like {{ article }}) * added a 'as' string to the block tag short notation ({% block title "Title" %} must now be {% block title as "Title" %}) diff --git a/lib/Twig/Filter.php b/lib/Twig/Filter.php index 8ee4d50..05557dd 100644 --- a/lib/Twig/Filter.php +++ b/lib/Twig/Filter.php @@ -16,7 +16,7 @@ * @author Fabien Potencier * @version SVN: $Id$ */ -abstract class Twig_Filter +abstract class Twig_Filter implements Twig_FilterInterface { protected $options; @@ -28,8 +28,6 @@ abstract class Twig_Filter ), $options); } - abstract public function compile(); - public function needsEnvironment() { return $this->options['needs_environment']; diff --git a/lib/Twig/FilterInterface.php b/lib/Twig/FilterInterface.php new file mode 100644 index 0000000..47e8413 --- /dev/null +++ b/lib/Twig/FilterInterface.php @@ -0,0 +1,22 @@ + + * @version SVN: $Id$ + */ +interface Twig_FilterInterface +{ + public function compile(); +} -- 1.7.2.5