Input
Less than 1 minute
Input
Properties
executable
private string $executableargv
private array $argvargs
private array $argsglobalOptions
private array $globalOptionsoptions
private array $optionsmodule
public string $modulecommand
public string $commandcommandObject
public Command $commandObjectMethods
initialise
Initialises the input object with the command line arguments.
public initialise(array $argv, array $moduleNames): boolParameters
| Parameter | Type | Description |
|---|---|---|
$argv | array | |
$moduleNames | array |
run
public run(Command $command): voidParameters
| Parameter | Type | Description |
|---|---|---|
$command | Command |
getExecutable
public getExecutable(): stringgetGlobalOption
public getGlobalOption(string $name): mixedParameters
| Parameter | Type | Description |
|---|---|---|
$name | string |
getModule
public getModule(): ?stringgetCommandObject
public getCommandObject(): ?CommandgetCommand
Gets the command that was used on the command line if it exists.
public getCommand(): ?stringgetArgument
public getArgument(string $name): ?stringParameters
| Parameter | Type | Description |
|---|---|---|
$name | string |
getArguments
Gets all the arguments that were passed to the command.
public getArguments(): voidgetOption
public getOption(string $name, ?string $default): mixedParameters
| Parameter | Type | Description |
|---|---|---|
$name | string | |
$default | string |
getOptions
Gets the options that were set on the command line.
public getOptions(): voidsetOption
public setOption(string $name, mixed $value): voidParameters
| Parameter | Type | Description |
|---|---|---|
$name | string | |
$value | mixed |
getArgv
Gets the options that were used on the command line.
public getArgv(): voidparseOption
Parses a command line option and adds it to the options array.
private parseOption(array $argv, array $optionsDefinition, array $options): boolParameters
| Parameter | Type | Description |
|---|---|---|
$argv | array | |
$optionsDefinition | array | |
$options | array |
Generated by Hazaar API Doc Generator on Wed, 07 Jan 2026 11:30:00 +0000