TokenParser.php 680B

1234567891011121314151617181920212223242526272829303132333435
  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. /**
  19. * @var Twig_Parser
  20. */
  21. protected $parser;
  22. /**
  23. * Sets the parser associated with this token parser
  24. *
  25. * @param $parser A Twig_Parser instance
  26. */
  27. public function setParser(Twig_Parser $parser)
  28. {
  29. $this->parser = $parser;
  30. }
  31. }