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|nullgetName()
Returns the name of this argument.
public
getName() : string
Return values
stringgetType()
public
getType() : Type|null
Return values
Type|nullisByReference()
public
isByReference() : bool
Return values
boolisVariadic()
public
isVariadic() : bool