ArgumentMetadata
in package
Responsible for storing metadata of an argument.
Tags
Table of Contents
- $defaultValue : mixed
- $hasDefaultValue : mixed
- $isNullable : mixed
- $isVariadic : mixed
- $name : mixed
- $type : mixed
- __construct() : mixed
- getDefaultValue() : mixed
- Returns the default value of the argument.
- getName() : string
- Returns the name as given in PHP, $foo would yield "foo".
- getType() : string|null
- Returns the type of the argument.
- hasDefaultValue() : bool
- Returns whether the argument has a default value.
- isNullable() : bool
- Returns whether the argument accepts null values.
- isVariadic() : bool
- Returns whether the argument is defined as "...$variadic".
Properties
$defaultValue
private
mixed
$defaultValue
$hasDefaultValue
private
mixed
$hasDefaultValue
$isNullable
private
mixed
$isNullable
$isVariadic
private
mixed
$isVariadic
$name
private
mixed
$name
$type
private
mixed
$type
Methods
__construct()
public
__construct(string $name, string|null $type, bool $isVariadic, bool $hasDefaultValue, mixed $defaultValue[, bool $isNullable = false ]) : mixed
Parameters
- $name : string
- $type : string|null
- $isVariadic : bool
- $hasDefaultValue : bool
- $defaultValue : mixed
- $isNullable : bool = false
Return values
mixed —getDefaultValue()
Returns the default value of the argument.
public
getDefaultValue() : mixed
Tags
Return values
mixed —getName()
Returns the name as given in PHP, $foo would yield "foo".
public
getName() : string
Return values
string —getType()
Returns the type of the argument.
public
getType() : string|null
The type is the PHP class in 5.5+ and additionally the basic type in PHP 7.0+.
Return values
string|null —hasDefaultValue()
Returns whether the argument has a default value.
public
hasDefaultValue() : bool
Implies whether an argument is optional.
Return values
bool —isNullable()
Returns whether the argument accepts null values.
public
isNullable() : bool
Return values
bool —isVariadic()
Returns whether the argument is defined as "...$variadic".
public
isVariadic() : bool