Array.php 551 B

1234567891011121314151617181920212223242526
  1. <?php
  2. /*
  3. * This file is part of Twig.
  4. *
  5. * (c) 2010 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. * @deprecated since version 1.5
  12. */
  13. class Twig_Extensions_Grammar_Array extends Twig_Extensions_Grammar
  14. {
  15. public function __toString()
  16. {
  17. return sprintf('<%s:array>', $this->name);
  18. }
  19. public function parse(Twig_Token $token)
  20. {
  21. return $this->parser->getExpressionParser()->parseArrayExpression();
  22. }
  23. }