ParserInterface.php 736 B

1234567891011121314151617181920212223242526272829303132
  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 parser 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_ParserInterface
  18. {
  19. /**
  20. * Converts a token stream to a node tree.
  21. *
  22. * @param Twig_TokenStream $stream A token stream instance
  23. *
  24. * @return Twig_Node_Module A node tree
  25. *
  26. * @throws Twig_Error_Syntax When the token stream is syntactically or semantically wrong
  27. */
  28. public function parse(Twig_TokenStream $stream);
  29. }