TokenParser.php 675 B

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