class ArgumentMetadata

Responsible for storing metadata of an argument.

Methods

__construct(string $name, string $type, bool $isVariadic, bool $hasDefaultValue, mixed $defaultValue, bool $isNullable = false)

No description

string
getName()

Returns the name as given in PHP, $foo would yield "foo".

string
getType()

Returns the type of the argument.

bool
isVariadic()

Returns whether the argument is defined as ".

bool
hasDefaultValue()

Returns whether the argument has a default value.

bool
isNullable()

Returns whether the argument accepts null values.

mixed
getDefaultValue()

Returns the default value of the argument.

Details

at line line 36
__construct(string $name, string $type, bool $isVariadic, bool $hasDefaultValue, mixed $defaultValue, bool $isNullable = false)

Parameters

string $name
string $type
bool $isVariadic
bool $hasDefaultValue
mixed $defaultValue
bool $isNullable

at line line 51
string getName()

Returns the name as given in PHP, $foo would yield "foo".

Return Value

string

at line line 63
string getType()

Returns the type of the argument.

The type is the PHP class in 5.5+ and additionally the basic type in PHP 7.0+.

Return Value

string

at line line 73
bool isVariadic()

Returns whether the argument is defined as ".

..$variadic".

Return Value

bool

at line line 85
bool hasDefaultValue()

Returns whether the argument has a default value.

Implies whether an argument is optional.

Return Value

bool

at line line 95
bool isNullable()

Returns whether the argument accepts null values.

Return Value

bool

at line line 107
mixed getDefaultValue()

Returns the default value of the argument.

Return Value

mixed

Exceptions

LogicException if no default value is present; {see self::hasDefaultValue()}