菜谱项目

ClassConstFetch.php 750B

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