FunctionInterface.php 698B

1234567891011121314151617181920212223242526272829303132333435363738
  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. function setArguments($arguments);
  29. function getArguments();
  30. }