菜谱项目

Interface_.php 980B

1234567891011121314151617181920212223242526272829303132
  1. <?php
  2. namespace PhpParser\Node\Stmt;
  3. use PhpParser\Node;
  4. class Interface_ extends ClassLike
  5. {
  6. /** @var Node\Name[] Extended interfaces */
  7. public $extends;
  8. /**
  9. * Constructs a class node.
  10. *
  11. * @param string $name Name
  12. * @param array $subNodes Array of the following optional subnodes:
  13. * 'extends' => array(): Name of extended interfaces
  14. * 'stmts' => array(): Statements
  15. * @param array $attributes Additional attributes
  16. */
  17. public function __construct($name, array $subNodes = array(), array $attributes = array()) {
  18. parent::__construct($attributes);
  19. $this->name = $name;
  20. $this->extends = isset($subNodes['extends']) ? $subNodes['extends'] : array();
  21. $this->stmts = isset($subNodes['stmts']) ? $subNodes['stmts'] : array();
  22. }
  23. public function getSubNodeNames() {
  24. return array('name', 'extends', 'stmts');
  25. }
  26. }