Function_
in package
implements
Element, MetaDataContainer, AttributeContainer
uses
MetadataContainer, HasAttributes
FinalYes
Descriptor representing a function
Table of Contents
Interfaces
- Element
- MetaDataContainer
- AttributeContainer
Properties
- $arguments : array<string|int, Argument>
- $attributes : array<string|int, Attribute>
- $docBlock : DocBlock|null
- $endLocation : Location
- $fqsen : Fqsen
- $hasReturnByReference : bool
- $location : Location
- $returnType : Type
Methods
- __construct() : mixed
- Initializes the object.
- addArgument() : void
- Add an argument to the function.
- addAttribute() : void
- getArguments() : array<string|int, Argument>
- Returns the arguments of this function.
- getAttributes() : array<string|int, Attribute>
- getDocBlock() : DocBlock|null
- Returns the DocBlock of the element if available
- getEndLocation() : Location
- getFqsen() : Fqsen
- Returns the Fqsen of the element.
- getHasReturnByReference() : bool
- getLocation() : Location
- getName() : string
- Returns the name of the element.
- getReturnType() : Type
Properties
$arguments
private
array<string|int, Argument>
$arguments
= []
$attributes
private
array<string|int, Attribute>
$attributes
= []
$docBlock read-only
private
DocBlock|null
$docBlock
= null
$endLocation read-only
private
Location
$endLocation
$fqsen read-only
private
Fqsen
$fqsen
Full Qualified Structural Element Name
$hasReturnByReference read-only
private
bool
$hasReturnByReference
= false
$location read-only
private
Location
$location
$returnType read-only
private
Type
$returnType
Methods
__construct()
Initializes the object.
public
__construct(Fqsen $fqsen[, DocBlock|null $docBlock = null ][, Location|null $location = null ][, Location|null $endLocation = null ][, Type|null $returnType = null ][, bool $hasReturnByReference = false ]) : mixed
Parameters
- $fqsen : Fqsen
- $docBlock : DocBlock|null = null
- $location : Location|null = null
- $endLocation : Location|null = null
- $returnType : Type|null = null
- $hasReturnByReference : bool = false
addArgument()
Add an argument to the function.
public
addArgument(Argument $argument) : void
Parameters
- $argument : Argument
addAttribute()
public
addAttribute(Attribute $attribute) : void
Parameters
- $attribute : Attribute
getArguments()
Returns the arguments of this function.
public
getArguments() : array<string|int, Argument>
Return values
array<string|int, Argument>getAttributes()
public
getAttributes() : array<string|int, Attribute>
Return values
array<string|int, Attribute>getDocBlock()
Returns the DocBlock of the element if available
public
getDocBlock() : DocBlock|null
Return values
DocBlock|nullgetEndLocation()
public
getEndLocation() : Location
Return values
LocationgetFqsen()
Returns the Fqsen of the element.
public
getFqsen() : Fqsen
Attributes
- #[Override]
Return values
FqsengetHasReturnByReference()
public
getHasReturnByReference() : bool
Return values
boolgetLocation()
public
getLocation() : Location
Return values
LocationgetName()
Returns the name of the element.
public
getName() : string
Attributes
- #[Override]
Return values
stringgetReturnType()
public
getReturnType() : Type