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" %})
* @author Fabien Potencier <fabien.potencier@symfony-project.com>
* @version SVN: $Id$
*/
-abstract class Twig_Filter
+abstract class Twig_Filter implements Twig_FilterInterface
{
protected $options;
), $options);
}
- abstract public function compile();
-
public function needsEnvironment()
{
return $this->options['needs_environment'];
--- /dev/null
+<?php
+
+/*
+ * This file is part of Twig.
+ *
+ * (c) 2010 Fabien Potencier
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+/**
+ * Represents a template filter.
+ *
+ * @package twig
+ * @author Fabien Potencier <fabien.potencier@symfony-project.com>
+ * @version SVN: $Id$
+ */
+interface Twig_FilterInterface
+{
+ public function compile();
+}