Methods |
public
|
__construct(string|Identifier $name, array $subNodes = [], array $attributes = [])
Constructs a class method node.
Constructs a class method node.
Parameters
$name |
Name
|
$subNodes |
Array of the following optional subnodes:
'flags => MODIFIER_PUBLIC: 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
List of parameters
|
#
|
public
|
getReturnType()
Get the declared return type or null
Get the declared return type or null
Implements
|
#
|
public
|
getStmts()
The function body
|
#
|
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
|
#
|