TokenParser.php 640B

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. * Base class for all token parsers.
  12. *
  13. * @package twig
  14. * @author Fabien Potencier <fabien@symfony.com>
  15. */
  16. abstract class Twig_TokenParser implements Twig_TokenParserInterface
  17. {
  18. protected $parser;
  19. /**
  20. * Sets the parser associated with this token parser
  21. *
  22. * @param $parser A Twig_Parser instance
  23. */
  24. public function setParser(Twig_Parser $parser)
  25. {
  26. $this->parser = $parser;
  27. }
  28. }