Aplus Framework Docs

Help extends Command
in package

Class Help.

Table of Contents

$active  : bool
Tells if command is active.
$console  : Console
Console instance of the current command.
$description  : string
Command description.
$name  : string
Command name.
$options  : array<string|int, mixed>
Command options.
$usage  : string
Command usage.
__construct()  : mixed
Command constructor.
activate()  : static
Activate the command.
deactivate()  : static
Deactivate the command.
getConsole()  : Console
Get console instance.
getDescription()  : string
Get command description.
getName()  : string
Get command name.
getOptions()  : array<string, string>
Get command options.
getUsage()  : string
Get command usage.
isActive()  : bool
Tells if the command is active.
run()  : void
Run the command.
setConsole()  : static
Set console instance.
setDescription()  : static
Set command description.
setName()  : static
Set command name.
setOptions()  : static
Set command options.
setUsage()  : static
Set command usage.
renderOption()  : string
showCommand()  : void

Properties

$active

Tells if command is active.

protected bool $active = true

$console

Console instance of the current command.

protected Console $console

$description

Command description.

protected string $description

$name

Command name.

protected string $name = 'help'

$options

Command options.

protected array<string|int, mixed> $options = []

$usage

Command usage.

protected string $usage = 'help [command_name]'

Methods

__construct()

Command constructor.

public __construct([Console|null $console = null ]) : mixed
Parameters
$console : Console|null = null
Return values
mixed

activate()

Activate the command.

public activate() : static
Return values
static

deactivate()

Deactivate the command.

public deactivate() : static
Return values
static

getDescription()

Get command description.

public getDescription() : string
Return values
string

getName()

Get command name.

public getName() : string
Return values
string

getOptions()

Get command options.

public getOptions() : array<string, string>
Return values
array<string, string>

getUsage()

Get command usage.

public getUsage() : string
Return values
string

isActive()

Tells if the command is active.

public isActive() : bool
Return values
bool

run()

Run the command.

public run() : void
Return values
void

setConsole()

Set console instance.

public setConsole(Console $console) : static
Parameters
$console : Console
Return values
static

setDescription()

Set command description.

public setDescription(string $description) : static
Parameters
$description : string
Return values
static

setName()

Set command name.

public setName(string $name) : static
Parameters
$name : string
Return values
static

setOptions()

Set command options.

public setOptions(array<string, string> $options) : static
Parameters
$options : array<string, string>
Return values
static

setUsage()

Set command usage.

public setUsage(string $usage) : static
Parameters
$usage : string
Return values
static

renderOption()

protected renderOption(string $text) : string
Parameters
$text : string
Return values
string

showCommand()

protected showCommand(string $commandName) : void
Parameters
$commandName : string
Return values
void

Search results