FilterInterface.php 849 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <?php
  2. /*
  3. * This file is part of Twig.
  4. *
  5. * (c) 2010 Fabien Potencier
  6. *
  7. * For the full copyright and license information, please view the LICENSE
  8. * file that was distributed with this source code.
  9. */
  10. /**
  11. * Represents a template filter.
  12. *
  13. * Use Twig_SimpleFilter instead.
  14. *
  15. * @author Fabien Potencier <fabien@symfony.com>
  16. *
  17. * @deprecated since 1.12 (to be removed in 2.0)
  18. */
  19. interface Twig_FilterInterface
  20. {
  21. /**
  22. * Compiles a filter.
  23. *
  24. * @return string The PHP code for the filter
  25. */
  26. public function compile();
  27. public function needsEnvironment();
  28. public function needsContext();
  29. public function getSafe(Twig_Node $filterArgs);
  30. public function getPreservesSafety();
  31. public function getPreEscape();
  32. public function setArguments($arguments);
  33. public function getArguments();
  34. }