HelpModule
HelpModule
Built-in console help module.
class HelpModule extends \Hazaar\Console\ModuleExtends: Hazaar\Console\Module
Provides general usage output, module/command-specific help text, and formatted listings of available commands, arguments, and options.
Properties
executable
Executable name used when rendering usage examples.
private string $executableType: string
Methods
execute
Executes help rendering for the current input context.
public execute(Input $input, Output $output): intReturns: int
Parameters
| Parameter | Type | Description |
|---|---|---|
$input | Hazaar\Console\Input | parsed command-line input |
$output | Hazaar\Console\Output | console output writer |
configure
Registers global help options and the help command definition.
protected configure(): voidReturns: void
writeGlobalOptions
Writes global option definitions when available.
private writeGlobalOptions(Output $output): voidReturns: void
Parameters
| Parameter | Type | Description |
|---|---|---|
$output | Hazaar\Console\Output | console output writer |
writeCommands
Writes the available commands to the output.
private writeCommands(Output $output, array $commands): voidReturns: void
Parameters
| Parameter | Type | Description |
|---|---|---|
$output | Hazaar\Console\Output | |
$commands | array |
writeCommand
Writes detailed help output for a specific command.
private writeCommand(Output $output, Command $command, ?Module $module): voidReturns: void
Parameters
| Parameter | Type | Description |
|---|---|---|
$output | Hazaar\Console\Output | console output writer |
$command | Hazaar\Console\Command | command definition to describe |
$module | Hazaar\Console\Module | optional module owning the command |
writeArguments
Writes the arguments for a command to the output.
private writeArguments(Output $output, array $arguments): voidReturns: void
Parameters
| Parameter | Type | Description |
|---|---|---|
$output | Hazaar\Console\Output | |
$arguments | array |
writeOptions
Writes the options for a command to the output.
private writeOptions(Output $output, array $options, string $label = 'Options'): voidReturns: void
Parameters
| Parameter | Type | Description |
|---|---|---|
$output | Hazaar\Console\Output | |
$options | array | |
$label | string |
writeModuleHelp
private writeModuleHelp(Output $output, Module $module): voidReturns: void
Parameters
| Parameter | Type | Description |
|---|---|---|
$output | Hazaar\Console\Output | |
$module | Hazaar\Console\Module |
writeHelp
private writeHelp(Output $output): voidReturns: void
Parameters
| Parameter | Type | Description |
|---|---|---|
$output | Hazaar\Console\Output |
Generated by Hazaar API Doc Generator on Fri, 04 Sep 2026 23:32:18 +0000