ConstFetch.php 568 B

12345678910111213141516171819202122232425262728
  1. <?php
  2. namespace PhpParser\Node\Expr;
  3. use PhpParser\Node\Expr;
  4. use PhpParser\Node\Name;
  5. class ConstFetch extends Expr
  6. {
  7. /** @var Name Constant name */
  8. public $name;
  9. /**
  10. * Constructs a const fetch node.
  11. *
  12. * @param Name $name Constant name
  13. * @param array $attributes Additional attributes
  14. */
  15. public function __construct(Name $name, array $attributes = array()) {
  16. parent::__construct($attributes);
  17. $this->name = $name;
  18. }
  19. public function getSubNodeNames() {
  20. return array('name');
  21. }
  22. }