StaticVar.php 737 B

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