您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

Grammar.php 717B

123456789101112131415161718192021222324252627282930313233343536373839
  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. abstract class Twig_Extensions_Grammar implements Twig_Extensions_GrammarInterface
  11. {
  12. protected $name;
  13. protected $parser;
  14. /**
  15. * @param string $name
  16. */
  17. public function __construct($name)
  18. {
  19. $this->name = $name;
  20. }
  21. /**
  22. * @param Twig_Parser $parser
  23. */
  24. public function setParser(Twig_Parser $parser)
  25. {
  26. $this->parser = $parser;
  27. }
  28. /**
  29. * @return string
  30. */
  31. public function getName()
  32. {
  33. return $this->name;
  34. }
  35. }