Method
extends BaseTag
in package
implements
StaticMethod
Reflection class for an {@}method in a Docblock.
Interfaces, Classes and Traits
Table of Contents
- $description : Description|null
- $name : string
- $isStatic : bool
- $methodName : string
- $parameters : array<string|int, mixed>
- $returnsReference : bool
- $returnType : Type
- __construct() : mixed
- __toString() : string
- create() : mixed
- getArguments() : array<int, array<string, \phpDocumentor\Reflection\Type|string>>
- getDescription() : Description|null
- getMethodName() : string
- Retrieves the method name.
- getName() : string
- Gets the name of this tag.
- getParameters() : array<string|int, MethodParameter>
- getReturnType() : Type
- isStatic() : bool
- Checks whether the method tag describes a static method or not.
- render() : string
- returnsReference() : bool
- filterArguments() : array<string|int, array<string|int, mixed>>
- fromLegacyArguments() : array<string|int, MethodParameter>
- stripRestArg() : string
Properties
$description
protected
Description|null
$description
= null
Description of the tag.
$name
protected
string
$name
= 'method'
Name of the tag
$isStatic
private
bool
$isStatic
$methodName
private
string
$methodName
$parameters
private
array<string|int, mixed>
$parameters
$returnsReference
private
bool
$returnsReference
$returnType
private
Type
$returnType
Methods
__construct()
public
__construct(string $methodName[, array<int, array<string, \phpDocumentor\Reflection\Type|string>> $arguments = [] ][, Type|null $returnType = null ][, bool $static = false ][, Description|null $description = null ][, bool $returnsReference = false ][, array<string|int, MethodParameter> $parameters = null ]) : mixed
Parameters
- $methodName : string
- $arguments : array<int, array<string, \phpDocumentor\Reflection\Type|string>> = []
- $returnType : Type|null = null
- $static : bool = false
- $description : Description|null = null
- $returnsReference : bool = false
- $parameters : array<string|int, MethodParameter> = null
Tags
Return values
mixed —__toString()
public
__toString() : string
Return values
string —create()
public
static create(string $body[, TypeResolver|null $typeResolver = null ][, DescriptionFactory|null $descriptionFactory = null ][, Context|null $context = null ]) : mixed
Parameters
- $body : string
- $typeResolver : TypeResolver|null = null
- $descriptionFactory : DescriptionFactory|null = null
- $context : Context|null = null
Tags
Return values
mixed —getArguments()
public
getArguments() : array<int, array<string, \phpDocumentor\Reflection\Type|string>>
Tags
Return values
array<int, array<string, \phpDocumentor\Reflection\Type|string>> —getDescription()
public
getDescription() : Description|null
Return values
Description|null —getMethodName()
Retrieves the method name.
public
getMethodName() : string
Return values
string —getName()
Gets the name of this tag.
public
getName() : string
Return values
string —The name of this tag.
getParameters()
public
getParameters() : array<string|int, MethodParameter>
Return values
array<string|int, MethodParameter> —getReturnType()
public
getReturnType() : Type
Return values
Type —isStatic()
Checks whether the method tag describes a static method or not.
public
isStatic() : bool
Return values
bool —TRUE if the method declaration is for a static method, FALSE otherwise.
render()
public
render([Formatter|null $formatter = null ]) : string
Parameters
- $formatter : Formatter|null = null
Return values
string —returnsReference()
public
returnsReference() : bool
Return values
bool —filterArguments()
private
filterArguments([array<string|int, array<string|int, mixed>>|array<string|int, string> $arguments = [] ]) : array<string|int, array<string|int, mixed>>
Parameters
- $arguments : array<string|int, array<string|int, mixed>>|array<string|int, string> = []
Tags
Return values
array<string|int, array<string|int, mixed>> —fromLegacyArguments()
private
fromLegacyArguments(array{name: string, type: \phpDocumentor\Reflection\Type} $arguments) : array<string|int, MethodParameter>
Parameters
- $arguments : array{name: string, type: \phpDocumentor\Reflection\Type}
Tags
Return values
array<string|int, MethodParameter> —stripRestArg()
private
static stripRestArg(string $argument) : string
Parameters
- $argument : string