CompilerInterface.php 782 B

12345678910111213141516171819202122232425262728293031323334353637
  1. <?php
  2. /*
  3. * This file is part of Twig.
  4. *
  5. * (c) 2009 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. * Interface implemented by compiler classes.
  12. *
  13. * @author Fabien Potencier <fabien@symfony.com>
  14. *
  15. * @deprecated since 1.12 (to be removed in 3.0)
  16. */
  17. interface Twig_CompilerInterface
  18. {
  19. /**
  20. * Compiles a node.
  21. *
  22. * @param Twig_NodeInterface $node The node to compile
  23. *
  24. * @return Twig_CompilerInterface The current compiler instance
  25. */
  26. public function compile(Twig_NodeInterface $node);
  27. /**
  28. * Gets the current PHP code after compilation.
  29. *
  30. * @return string The PHP code
  31. */
  32. public function getSource();
  33. }