Constant.php 557B

123456789101112131415161718192021222324
  1. <?php
  2. /*
  3. * This file is part of Twig.
  4. *
  5. * (c) 2009 Fabien Potencier
  6. * (c) 2009 Armin Ronacher
  7. *
  8. * For the full copyright and license information, please view the LICENSE
  9. * file that was distributed with this source code.
  10. */
  11. class Twig_Node_Expression_Constant extends Twig_Node_Expression
  12. {
  13. public function __construct($value, $lineno)
  14. {
  15. parent::__construct(array(), array('value' => $value), $lineno);
  16. }
  17. public function compile(Twig_Compiler $compiler)
  18. {
  19. $compiler->repr($this->getAttribute('value'));
  20. }
  21. }