PreCommandRunEvent
extends Event
in package
The pre command run event.
Tags
Table of Contents
- $args : array<string|int, mixed>
- $flags : array<string|int, mixed>
- $name : string
- $command : string
- $input : InputInterface
- $propagationStopped : bool
- __construct() : mixed
- Constructor.
- getArguments() : array<string|int, mixed>
- Returns the event's arguments.
- getCommand() : string
- Returns the command about to be executed
- getFlags() : array<string|int, mixed>
- Returns the event's flags.
- getInput() : InputInterface
- Returns the console input
- getName() : string
- Returns the event's name.
- isPropagationStopped() : bool
- Checks if stopPropagation has been called
- stopPropagation() : mixed
- Prevents the event from being passed to further listeners
Properties
$args
protected
array<string|int, mixed>
$args
Arguments passed by the user, these will be forwarded to CLI script handlers
$flags
protected
array<string|int, mixed>
$flags
Flags usable in PHP script handlers
$name
protected
string
$name
This event's name
$command
private
string
$command
$input
private
InputInterface
$input
$propagationStopped
private
bool
$propagationStopped
= false
Whether the event should not be passed to more listeners
Methods
__construct()
Constructor.
public
__construct(string $name, InputInterface $input, string $command) : mixed
Parameters
- $name : string
-
The event name
- $input : InputInterface
- $command : string
-
The command about to be executed
Return values
mixed —getArguments()
Returns the event's arguments.
public
getArguments() : array<string|int, mixed>
Return values
array<string|int, mixed> —The event arguments
getCommand()
Returns the command about to be executed
public
getCommand() : string
Return values
string —getFlags()
Returns the event's flags.
public
getFlags() : array<string|int, mixed>
Return values
array<string|int, mixed> —The event flags
getInput()
Returns the console input
public
getInput() : InputInterface
Return values
InputInterface —getName()
Returns the event's name.
public
getName() : string
Return values
string —The event name
isPropagationStopped()
Checks if stopPropagation has been called
public
isPropagationStopped() : bool
Return values
bool —Whether propagation has been stopped
stopPropagation()
Prevents the event from being passed to further listeners
public
stopPropagation() : mixed