Methods |
public
|
__construct(
string|Identifier $name,
array{flags?: int, byRef?: bool, params?: Param[], returnType?: (null|Identifier|Name|ComplexType), stmts?: (Stmt[]|null), attrGroups?: AttributeGroup[]} $subNodes = [],
array<string, mixed> $attributes = [],
)
Constructs a class method node.
Constructs a class method node.
Parameters
$name |
Name
|
$subNodes |
Array of the following optional subnodes:
'flags => 0 : Flags
'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
|
getStmts(): ?array
|
#
|
public
|
getAttrGroups(): array
Get PHP attribute groups.
Get PHP attribute groups.
Implements
|
#
|
public
|
isPublic(): bool
Whether the method is explicitly or implicitly public.
Whether the method is explicitly or implicitly public.
|
#
|
public
|
isProtected(): bool
Whether the method is protected.
Whether the method is protected.
|
#
|
public
|
isPrivate(): bool
Whether the method is private.
Whether the method is private.
|
#
|
public
|
isAbstract(): bool
Whether the method is abstract.
Whether the method is abstract.
|
#
|
public
|
isFinal(): bool
Whether the method is final.
Whether the method is final.
|
#
|
public
|
isStatic(): bool
Whether the method is static.
Whether the method is static.
|
#
|
public
|
isMagic(): bool
Whether the method is magic.
Whether the method is magic.
|
#
|
public
|
getType(): string
Gets the type of the node.
Gets the type of the node.
Returns
Implements
|
#
|