class ArgumentMetadata
Responsible for storing metadata of an argument.
__construct(string $name, string|null $type, bool $isVariadic, bool $hasDefaultValue, $defaultValue, bool $isNullable = false) | ||
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. |
string | $name | |
string|null | $type | |
bool | $isVariadic | |
bool | $hasDefaultValue | |
$defaultValue | ||
bool | $isNullable |
Returns the name as given in PHP, $foo would yield "foo".
string |
Returns the type of the argument.
The type is the PHP class in 5.5+ and additionally the basic type in PHP 7.0+.
string |
Returns whether the argument is defined as ".
..$variadic".
bool |
Returns whether the argument has a default value.
Implies whether an argument is optional.
bool |
Returns whether the argument accepts null values.
bool |
Returns the default value of the argument.
mixed |
LogicException | if no default value is present; {see self::hasDefaultValue()} |
© 2004–2017 Fabien Potencier
Licensed under the MIT License.
https://api.symfony.com/4.1/Symfony/Component/HttpKernel/ControllerMetadata/ArgumentMetadata.html