Input
Less than 1 minute
Input
Properties
executable
private string $executable
argv
private array $argv
args
private array $args
globalOptions
private array $globalOptions
options
private array $options
module
public string $module
command
public string $command
commandObject
public Command $commandObject
Methods
initialise
Initialises the input object with the command line arguments.
public initialise(array $argv, array $moduleNames): bool
Parameters
Parameter | Type | Description |
---|---|---|
$argv | array | |
$moduleNames | array |
run
public run(Command $command): void
Parameters
Parameter | Type | Description |
---|---|---|
$command | Command |
getExecutable
public getExecutable(): string
getGlobalOption
public getGlobalOption(string $name): mixed
Parameters
Parameter | Type | Description |
---|---|---|
$name | string |
getModule
public getModule(): ?string
getCommandObject
public getCommandObject(): ?Command
getCommand
Gets the command that was used on the command line if it exists.
public getCommand(): ?string
getArgument
public getArgument(string $name): ?string
Parameters
Parameter | Type | Description |
---|---|---|
$name | string |
getArguments
Gets all the arguments that were passed to the command.
public getArguments(): void
getOption
public getOption(string $name, ?string $default): mixed
Parameters
Parameter | Type | Description |
---|---|---|
$name | string | |
$default | string |
getOptions
Gets the options that were set on the command line.
public getOptions(): void
setOption
public setOption(string $name, mixed $value): void
Parameters
Parameter | Type | Description |
---|---|---|
$name | string | |
$value | mixed |
getArgv
Gets the options that were used on the command line.
public getArgv(): void
parseOption
Parses a command line option and adds it to the options array.
private parseOption(array $argv, array $optionsDefinition, array $options): bool
Parameters
Parameter | Type | Description |
---|---|---|
$argv | array | |
$optionsDefinition | array | |
$options | array |
Generated by Hazaar API Doc Generator on Wed, 25 Jun 2025 06:07:10 +0000