Methods |
public
|
__construct(
string $name,
int|null $mode = null,
string $description = '',
string|bool|int|float|array|null $default = null,
)
Parameters
$name |
The argument name
|
$mode |
The argument mode: self::REQUIRED or self::OPTIONAL
|
$description |
A description text
|
$default |
The default value (for self::OPTIONAL mode only)
|
Throws
|
#
|
public
|
getName(): string
Returns the argument name.
Returns the argument name.
|
#
|
public
|
isRequired(): bool
Returns true if the argument is required.
Returns true if the argument is required.
Returns
true if parameter mode is self::REQUIRED, false otherwise
|
#
|
public
|
isArray(): bool
Returns true if the argument can take multiple values.
Returns true if the argument can take multiple values.
Returns
true if mode is self::IS_ARRAY, false otherwise
|
#
|
public
|
setDefault(string|bool|int|float|array|null $default = null)
Sets the default value.
|
#
|
public
|
getDefault(): string|bool|int|float|array|null
Returns the default value.
Returns the default value.
|
#
|
public
|
getDescription(): string
Returns the description text.
Returns the description text.
|
#
|