API Documentation (v0.9.0-alpha)

Avolutions\Command\Argument

Contains the definition of a Command Argument.

Properties

Property Visibility Type Description
$default public mixed Default value of the Argument.
$help public string Help text for the Argument.
$name public string Name of the Argument.
$optional public bool Indicates if Argument is optional (true) or not (false).

Methods

Method Visibility Description
__construct() public Creates a new Argument definition.

Property Details

$default

Default value of the Argument.

public mixed $default = null
$help

Help text for the Argument.

public string $help
$name

Name of the Argument.

public string $name
$optional

Indicates if Argument is optional (true) or not (false).

public bool $optional

Method Details

__construct()

Creates a new Argument definition.

public __construct(string $name[, string $help = '' ][, bool $optional = false ][, mixed|null $default = null ]) : mixed
Parameters

string $name
Name of the Argument.

string $help (optional)
Help text for the Argument.

bool $optional (optional)
Indicates if Argument is optional (true) or not (false).

mixed|null $default (optional)
Default value if no value is passed for optional Argument.