FunctionInterface.php 628B

12345678910111213141516171819202122232425262728293031323334
  1. <?php
  2. /*
  3. * This file is part of Twig.
  4. *
  5. * (c) 2010 Fabien Potencier
  6. * (c) 2010 Arnaud Le Blanc
  7. *
  8. * For the full copyright and license information, please view the LICENSE
  9. * file that was distributed with this source code.
  10. */
  11. /**
  12. * Represents a template function.
  13. *
  14. * @package twig
  15. * @author Arnaud Le Blanc <arnaud.lb@gmail.com>
  16. */
  17. interface Twig_FunctionInterface
  18. {
  19. /**
  20. * Compiles a function.
  21. *
  22. * @return string The PHP code for the function
  23. */
  24. function compile();
  25. function needsEnvironment();
  26. function needsContext();
  27. function getSafe(Twig_Node $filterArgs);
  28. }