Method
extends BaseTag
in package
FinalYes
Reflection class for an {@}method in a Docblock.
Table of Contents
Properties
- $description : Description|null
- $name : string
- $isStatic : bool
- $methodName : string
- $parameters : array<string|int, MethodParameter>
- $returnsReference : bool
- $returnType : Type
Methods
- __construct() : mixed
- __toString() : string
- create() : Tag|mixed
- 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
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, MethodParameter>
$parameters
$returnsReference
private
bool
$returnsReference
$returnType
private
Type
$returnType
Methods
__construct()
public
__construct(string $methodName[, array<string|int, MethodParameter> $parameters = [] ][, Type|null $returnType = null ][, bool $static = false ][, Description|null $description = null ][, bool $returnsReference = false ]) : mixed
Parameters
- $methodName : string
- $parameters : array<string|int, MethodParameter> = []
- $returnType : Type|null = null
- $static : bool = false
- $description : Description|null = null
- $returnsReference : bool = false
__toString()
public
__toString() : string
Return values
stringcreate()
public
static create(string $body) : Tag|mixed
Parameters
- $body : string
Return values
Tag|mixed —Class that implements Tag
getDescription()
public
getDescription() : Description|null
Return values
Description|nullgetMethodName()
Retrieves the method name.
public
getMethodName() : string
Return values
stringgetName()
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
TypeisStatic()
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
stringreturnsReference()
public
returnsReference() : bool