Method
extends BaseTag
in package
implements
StaticMethod
Reflection class for an {@}method in a Docblock.
Interfaces, Classes, Traits and Enums
Table of Contents
- $description : Description|null
- $name : string
- $arguments : array<int, array<string, \phpDocumentor\Reflection\Type|string>>
- $isStatic : bool
- $methodName : string
- $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.
- getReturnType() : Type
- isStatic() : bool
- Checks whether the method tag describes a static method or not.
- render() : string
- filterArguments() : array<string|int, array<string|int, mixed>>
- stripRestArg() : string
Properties
$description
protected
Description|null
$description
Description of the tag.
$name
protected
string
$name
= 'method'
$arguments
private
array<int, array<string, \phpDocumentor\Reflection\Type|string>>
$arguments
Tags
$isStatic
private
bool
$isStatic
$methodName
private
string
$methodName
$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 ]) : mixed
Parameters
- $methodName : string
- $arguments : array<int, array<string, \phpDocumentor\Reflection\Type|string>> = []
- $returnType : Type|null = null
- $static : bool = false
- $description : Description|null = 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
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.
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 —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>> —stripRestArg()
private
static stripRestArg(string $argument) : string
Parameters
- $argument : string