class Interface_
Same name in this branch
- 11.1.x vendor/nikic/php-parser/lib/PhpParser/Builder/Interface_.php \PhpParser\Builder\Interface_
Hierarchy
- class \PhpParser\Node\Stmt\ClassLike extends \Node\Stmt
- class \PhpParser\Node\Stmt\Interface_ extends \PhpParser\Node\Stmt\ClassLike
Expanded class hierarchy of Interface_
5 files declare their use of Interface_
- CodeUnitFindingVisitor.php in vendor/
phpunit/ php-code-coverage/ src/ StaticAnalysis/ CodeUnitFindingVisitor.php - ComplexityCalculatingVisitor.php in vendor/
sebastian/ complexity/ src/ Visitor/ ComplexityCalculatingVisitor.php - IgnoredLinesFindingVisitor.php in vendor/
phpunit/ php-code-coverage/ src/ StaticAnalysis/ IgnoredLinesFindingVisitor.php - InheritanceOfDeprecatedInterfaceRule.php in vendor/
phpstan/ phpstan-deprecation-rules/ src/ Rules/ Deprecations/ InheritanceOfDeprecatedInterfaceRule.php - ParserAbstract.php in vendor/
nikic/ php-parser/ lib/ PhpParser/ ParserAbstract.php
File
-
vendor/
nikic/ php-parser/ lib/ PhpParser/ Node/ Stmt/ Interface_.php, line 7
Namespace
PhpParser\Node\StmtView source
class Interface_ extends ClassLike {
/** @var Node\Name[] Extended interfaces */
public array $extends;
/**
* Constructs a class node.
*
* @param string|Node\Identifier $name Name
* @param array{
* extends?: Node\Name[],
* stmts?: Node\Stmt[],
* attrGroups?: Node\AttributeGroup[],
* } $subNodes Array of the following optional subnodes:
* 'extends' => array(): Name of extended interfaces
* 'stmts' => array(): Statements
* 'attrGroups' => array(): PHP attribute groups
* @param array<string, mixed> $attributes Additional attributes
*/
public function __construct($name, array $subNodes = [], array $attributes = []) {
$this->attributes = $attributes;
$this->name = \is_string($name) ? new Node\Identifier($name) : $name;
$this->extends = $subNodes['extends'] ?? [];
$this->stmts = $subNodes['stmts'] ?? [];
$this->attrGroups = $subNodes['attrGroups'] ?? [];
}
public function getSubNodeNames() : array {
return [
'attrGroups',
'name',
'extends',
'stmts',
];
}
public function getType() : string {
return 'Stmt_Interface';
}
}
Members
Title Sort descending | Modifiers | Object type | Summary |
---|---|---|---|
ClassLike::$attrGroups | public | property | @var Node\AttributeGroup[] PHP attribute groups |
ClassLike::$name | public | property | @var Node\Identifier|null Name |
ClassLike::$namespacedName | public | property | @var Node\Name|null Namespaced name (if using NameResolver) |
ClassLike::$stmts | public | property | @var Node\Stmt[] Statements |
ClassLike::getConstants | public | function | |
ClassLike::getMethod | public | function | Gets method with the given name defined directly in this class/interface/trait. |
ClassLike::getMethods | public | function | Gets all methods defined directly in this class/interface/trait |
ClassLike::getProperties | public | function | |
ClassLike::getProperty | public | function | Gets property with the given name defined directly in this class/interface/trait. |
ClassLike::getTraitUses | public | function | |
Interface_::$extends | public | property | @var Node\Name[] Extended interfaces |
Interface_::getSubNodeNames | public | function | |
Interface_::getType | public | function | |
Interface_::__construct | public | function | Constructs a class node. |