菜谱项目

Const_.php 705B

12345678910111213141516171819202122232425262728293031
  1. <?php
  2. namespace PhpParser\Node;
  3. use PhpParser\NodeAbstract;
  4. class Const_ extends NodeAbstract
  5. {
  6. /** @var string Name */
  7. public $name;
  8. /** @var Expr Value */
  9. public $value;
  10. /**
  11. * Constructs a const node for use in class const and const statements.
  12. *
  13. * @param string $name Name
  14. * @param Expr $value Value
  15. * @param array $attributes Additional attributes
  16. */
  17. public function __construct($name, Expr $value, array $attributes = array()) {
  18. parent::__construct($attributes);
  19. $this->name = $name;
  20. $this->value = $value;
  21. }
  22. public function getSubNodeNames() {
  23. return array('name', 'value');
  24. }
  25. }