Interface_
extends Declaration
in package
Table of Contents
- $attributeGroups : array<string|int, AttributeGroup>
- $attributes : mixed
- $constants : mixed
- $extends : mixed
- $methods : mixed
- $name : mixed
- __construct() : mixed
- Creates an interface builder.
- addAttribute() : $this
- Adds an attribute group.
- addStmt() : $this
- Adds a statement.
- addStmts() : $this
- Adds multiple statements.
- extend() : $this
- Extends one or more interfaces.
- getNode() : Interface_
- Returns the built interface node.
- setDocComment() : $this
- Sets doc comment for the declaration.
Properties
$attributeGroups
protected
array<string|int, AttributeGroup>
$attributeGroups
= []
$attributes
protected
mixed
$attributes
= []
$constants
protected
mixed
$constants
= []
$extends
protected
mixed
$extends
= []
$methods
protected
mixed
$methods
= []
$name
protected
mixed
$name
Methods
__construct()
Creates an interface builder.
public
__construct(string $name) : mixed
Parameters
- $name : string
-
Name of the interface
Return values
mixed —addAttribute()
Adds an attribute group.
public
addAttribute(Attribute|AttributeGroup $attribute) : $this
Parameters
- $attribute : Attribute|AttributeGroup
Return values
$this —The builder instance (for fluid interface)
addStmt()
Adds a statement.
public
addStmt(Stmt|Builder $stmt) : $this
Parameters
Return values
$this —The builder instance (for fluid interface)
addStmts()
Adds multiple statements.
public
addStmts(array<string|int, mixed> $stmts) : $this
Parameters
- $stmts : array<string|int, mixed>
-
The statements to add
Return values
$this —The builder instance (for fluid interface)
extend()
Extends one or more interfaces.
public
extend(Name|string ...$interfaces) : $this
Parameters
- $interfaces : Name|string
-
Names of interfaces to extend
Return values
$this —The builder instance (for fluid interface)
getNode()
Returns the built interface node.
public
getNode() : Interface_
Return values
Interface_ —The built interface node
setDocComment()
Sets doc comment for the declaration.
public
setDocComment(Doc|string $docComment) : $this
Parameters
- $docComment : Doc|string
-
Doc comment to set
Return values
$this —The builder instance (for fluid interface)