菜谱项目

Namespace_.php 826B

1234567891011121314151617181920212223242526272829303132333435
  1. <?php
  2. namespace PhpParser\Node\Stmt;
  3. use PhpParser\Node;
  4. class Namespace_ extends Node\Stmt
  5. {
  6. /* For use in the "kind" attribute */
  7. const KIND_SEMICOLON = 1;
  8. const KIND_BRACED = 2;
  9. /** @var null|Node\Name Name */
  10. public $name;
  11. /** @var Node[] Statements */
  12. public $stmts;
  13. /**
  14. * Constructs a namespace node.
  15. *
  16. * @param null|Node\Name $name Name
  17. * @param null|Node[] $stmts Statements
  18. * @param array $attributes Additional attributes
  19. */
  20. public function __construct(Node\Name $name = null, $stmts = array(), array $attributes = array()) {
  21. parent::__construct($attributes);
  22. $this->name = $name;
  23. $this->stmts = $stmts;
  24. }
  25. public function getSubNodeNames() {
  26. return array('name', 'stmts');
  27. }
  28. }