Command
Command base class
Contains utilities to make developing CLI commands nicer
abstract class Winter\Storm\Console\Command
extends Illuminate\Console\Command
implements
Symfony\Component\Console\Command\SignalableCommandInterface
Traits
Trait | Description |
---|---|
HandlesCleanup
|
Console Command Trait that injects cross-platform signal handling to trigger cleanup on exit through the handleCleanup() method on the implementing class. |
ProvidesAutocompletion
|
Console Command Trait that injects cross-platform signal handling to trigger cleanup on exit through the handleCleanup() method on the implementing class. |
Properties
protected
$replaces
:
array
= []
List of commands that this command replaces (aliases)
Methods
public __construct ()
Create a new command instance.
Returns
mixed
public
alert (string $string, int | string | null $verbosity = null
)
: void
Write a string in an alert box.
Parameters
Property | Type | Description |
---|---|---|
$string | string |
string
|
$verbosity | int | string | null |
int | string | null
|
Returns
void
public
error (string $string, int | string | null $verbosity = null
)
: void
Write a string as error output.
Parameters
Property | Type | Description |
---|---|---|
$string | string |
string
|
$verbosity | int | string | null |
int | string | null
|
Returns
void
public complete (Symfony\Component\Console\Completion\CompletionInput $input, Symfony\Component\Console\Completion\CompletionSuggestions $suggestions) : void
Inherited from
ProvidesAutocompletion
Provide autocompletion for this command's input
Parameters
Property | Type | Description |
---|---|---|
$input | Symfony\Component\Console\Completion\CompletionInput |
Symfony\Component\Console\Completion\CompletionInput
|
$suggestions | Symfony\Component\Console\Completion\CompletionSuggestions |
Symfony\Component\Console\Completion\CompletionSuggestions
|
Returns
void
public getSubscribedSignals () : array
Inherited from
HandlesCleanup
Returns the process signals this command listens to
Returns
array
public handleSignal (integer $signal) : integer | false
Inherited from
HandlesCleanup
Handle the provided Unix process signal
Parameters
Property | Type | Description |
---|---|---|
$signal | integer |
integer
|
Returns
integer | false
public handleWindowsSignal (integer $event) : void
Inherited from
HandlesCleanup
Handle the provided Windows process singal.
Parameters
Property | Type | Description |
---|---|---|
$event | integer |
integer
|
Returns
void
Copyright © 2023 Winter CMS