Methods |
public
|
__construct(
string|Identifier $name,
array{byRef?: bool, params?: Param[], returnType?: (null|Identifier|Name|ComplexType), stmts?: Stmt[], attrGroups?: AttributeGroup[]} $subNodes = [],
array<string, mixed> $attributes = [],
)
Constructs a function node.
Constructs a function node.
Parameters
$name |
Name
|
$subNodes |
Array of the following optional subnodes:
'byRef' => false : Whether to return by reference
'params' => array(): Parameters
'returnType' => null : Return type
'stmts' => array(): Statements
'attrGroups' => array(): PHP attribute groups
|
$attributes |
Additional attributes
|
Overrides
|
#
|
public
|
getSubNodeNames(): array
Gets the names of the sub nodes.
Gets the names of the sub nodes.
Returns
Implements
|
#
|
public
|
returnsByRef(): bool
Whether to return by reference
Whether to return by reference
Implements
|
#
|
public
|
getParams(): array
|
#
|
public
|
getReturnType()
Get the declared return type or null
Get the declared return type or null
Implements
|
#
|
public
|
getAttrGroups(): array
Get PHP attribute groups.
Get PHP attribute groups.
Implements
|
#
|
public
|
getStmts(): Stmt[]
|
#
|
public
|
getType(): string
Gets the type of the node.
Gets the type of the node.
Returns
Implements
|
#
|