Methods |
public
|
__construct(
array{static?: bool, byRef?: bool, params?: Param[], uses?: ClosureUse[], returnType?: (null|Identifier|Name|ComplexType), stmts?: Stmt[], attrGroups?: AttributeGroup[]} $subNodes = [],
array<string, mixed> $attributes = [],
)
Constructs a lambda function node.
Constructs a lambda function node.
Parameters
$subNodes |
Array of the following optional subnodes:
'static' => false : Whether the closure is static
'byRef' => false : Whether to return by reference
'params' => array(): Parameters
'uses' => array(): use()s
'returnType' => null : Return type
'stmts' => array(): Statements
'attrGroups' => array(): PHP attributes 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
|
getStmts(): Stmt[]
|
#
|
public
|
getAttrGroups(): array
Get PHP attribute groups.
Get PHP attribute groups.
Implements
|
#
|
public
|
getType(): string
Gets the type of the node.
Gets the type of the node.
Returns
Implements
|
#
|