Mercurial > hg > cmmr2012-drupal-site
comparison vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Interface_.php @ 0:c75dbcec494b
Initial commit from drush-created site
author | Chris Cannam |
---|---|
date | Thu, 05 Jul 2018 14:24:15 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:c75dbcec494b |
---|---|
1 <?php declare(strict_types=1); | |
2 | |
3 namespace PhpParser\Node\Stmt; | |
4 | |
5 use PhpParser\Node; | |
6 | |
7 class Interface_ extends ClassLike | |
8 { | |
9 /** @var Node\Name[] Extended interfaces */ | |
10 public $extends; | |
11 | |
12 /** | |
13 * Constructs a class node. | |
14 * | |
15 * @param string|Node\Identifier $name Name | |
16 * @param array $subNodes Array of the following optional subnodes: | |
17 * 'extends' => array(): Name of extended interfaces | |
18 * 'stmts' => array(): Statements | |
19 * @param array $attributes Additional attributes | |
20 */ | |
21 public function __construct($name, array $subNodes = [], array $attributes = []) { | |
22 parent::__construct($attributes); | |
23 $this->name = \is_string($name) ? new Node\Identifier($name) : $name; | |
24 $this->extends = $subNodes['extends'] ?? []; | |
25 $this->stmts = $subNodes['stmts'] ?? []; | |
26 } | |
27 | |
28 public function getSubNodeNames() : array { | |
29 return ['name', 'extends', 'stmts']; | |
30 } | |
31 | |
32 public function getType() : string { | |
33 return 'Stmt_Interface'; | |
34 } | |
35 } |