\Composer\PluginCommandEvent

An event for all commands.

Summary

Methods
Properties
Constants
__construct()
getName()
getArguments()
getFlags()
isPropagationStopped()
stopPropagation()
getInput()
getOutput()
getCommandName()
No public properties found
No constants found
No protected methods found
$name
$args
$flags
N/A
No private methods found
$propagationStopped
$commandName
$input
$output
N/A

Properties

$name

$name : string

Type

string — This event's name

$args

$args : array

Type

array — Arguments passed by the user, these will be forwarded to CLI script handlers

$flags

$flags : array

Type

array — Flags usable in PHP script handlers

$propagationStopped

$propagationStopped : boolean

Type

boolean — Whether the event should not be passed to more listeners

$commandName

$commandName : string

Type

string

Methods

__construct()

__construct(string  $name, string  $commandName, \Symfony\Component\Console\Input\InputInterface  $input, \Symfony\Component\Console\Output\OutputInterface  $output, array  $args = array(), array  $flags = array()) 

Constructor.

Parameters

string $name

The event name

string $commandName

The command name

\Symfony\Component\Console\Input\InputInterface $input
\Symfony\Component\Console\Output\OutputInterface $output
array $args

Arguments passed by the user

array $flags

Optional flags to pass data not as argument

getName()

getName() : string

Returns the event's name.

Returns

string —

The event name

getArguments()

getArguments() : array

Returns the event's arguments.

Returns

array —

The event arguments

getFlags()

getFlags() : array

Returns the event's flags.

Returns

array —

The event flags

isPropagationStopped()

isPropagationStopped() : boolean

Checks if stopPropagation has been called

Returns

boolean —

Whether propagation has been stopped

stopPropagation()

stopPropagation() 

Prevents the event from being passed to further listeners

getCommandName()

getCommandName() : string

Retrieves the name of the command being run

Returns

string