From: Fabien Potencier Date: Wed, 26 May 2010 09:26:38 +0000 (+0200) Subject: added Twig_FilterInterface X-Git-Url: http://git.silmor.de/gitweb/?a=commitdiff_plain;h=c4e80ee525735a3a58138a0c9537936affe96637;p=web%2Fkonrad%2Ftwig.git added Twig_FilterInterface --- 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(); +}