Guides

Argument
in package

FinalYes

Descriptor representing a single Argument of a method or function.

Table of Contents

Properties

$byReference  : bool
$default  : string|null
$isVariadic  : bool
$name  : string
$type  : Type

Methods

__construct()  : mixed
Initializes the object.
getDefault()  : string|null
getName()  : string
Returns the name of this argument.
getType()  : Type|null
isByReference()  : bool
isVariadic()  : bool

Properties

$byReference read-only

private bool $byReference = false

whether the argument passes the parameter by reference instead of by value

$default read-only

private string|null $default = null

the default value for an argument or null if none is provided

$isVariadic read-only

private bool $isVariadic = false

Determines if this Argument represents a variadic argument

$name read-only

private string $name

name of the Argument

$type read-only

private Type $type

a normalized type that should be in this Argument

Methods

__construct()

Initializes the object.

public __construct(string $name[, Type|null $type = null ][, string|null $default = null ][, bool $byReference = false ][, bool $isVariadic = false ]) : mixed
Parameters
$name : string
$type : Type|null = null
$default : string|null = null
$byReference : bool = false
$isVariadic : bool = false

getDefault()

public getDefault() : string|null
Return values
string|null

getName()

Returns the name of this argument.

public getName() : string
Return values
string

getType()

public getType() : Type|null
Return values
Type|null

isByReference()

public isByReference() : bool
Return values
bool

isVariadic()

public isVariadic() : bool
Return values
bool

        
On this page

Search results