Guides

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

$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

getArguments()

Returns the arguments of this function.

public getArguments() : array<string|int, Argument>
Return values
array<string|int, Argument>

getDocBlock()

Returns the DocBlock of the element if available

public getDocBlock() : DocBlock|null
Return values
DocBlock|null

getEndLocation()

public getEndLocation() : Location
Return values
Location

getFqsen()

Returns the Fqsen of the element.

public getFqsen() : Fqsen
Attributes
#[Override]
Return values
Fqsen

getHasReturnByReference()

public getHasReturnByReference() : bool
Return values
bool

getLocation()

public getLocation() : Location
Return values
Location

getName()

Returns the name of the element.

public getName() : string
Attributes
#[Override]
Return values
string

getReturnType()

public getReturnType() : Type
Return values
Type

        
On this page

Search results