PageRenderTime 53ms CodeModel.GetById 28ms RepoModel.GetById 0ms app.codeStats 0ms

/lib/Twig/TokenParser/Flush.php

http://github.com/fabpot/Twig
PHP | 30 lines | 13 code | 4 blank | 13 comment | 0 complexity | 6c0e23ca4361117a4c0a9ca6f207f65d MD5 | raw file
Possible License(s): BSD-3-Clause, BSD-2-Clause
  1. <?php
  2. /*
  3. * This file is part of Twig.
  4. *
  5. * (c) 2011 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. * Flushes the output to the client.
  12. *
  13. * @see flush()
  14. */
  15. class Twig_TokenParser_Flush extends Twig_TokenParser
  16. {
  17. public function parse(Twig_Token $token)
  18. {
  19. $this->parser->getStream()->expect(Twig_Token::BLOCK_END_TYPE);
  20. return new Twig_Node_Flush($token->getLine(), $this->getTag());
  21. }
  22. public function getTag()
  23. {
  24. return 'flush';
  25. }
  26. }