NikicFunctionNode
class NikicFunctionNode implements FunctionNode (View source)
Adapter for nikic/php-parser Function_ nodes.
Methods
No description
Get the function name.
Get the function parameters.
Get the return type node, or null if no return type.
Get the doc comment node, or null if no doc comment.
Set the namespace for this function.
Get the namespace for this function.
Get the function attributes (PHP 8.0+).
Set the imports (use statements) for this function's file context.
Get the imports (use statements) for this function's file context.
Details
__construct(Function_ $function)
No description
string
getName()
Get the function name.
array
getParameters()
Get the function parameters.
TypeNode|null
getReturnType()
Get the return type node, or null if no return type.
DocCommentNode|null
getDocComment()
Get the doc comment node, or null if no doc comment.
void
setNamespace(string $namespace)
Set the namespace for this function.
string
getNamespace()
Get the namespace for this function.
array
getAttributes()
Get the function attributes (PHP 8.0+).
void
setImports(array $imports)
Set the imports (use statements) for this function's file context.
Maps alias names to fully qualified class names.
array
getImports()
Get the imports (use statements) for this function's file context.