class CommandEvent extends Event (View source)

deprecated use Composer\Script\Event instead

The Command Event.

Properties

protected string $name from Event
protected array $args from Event
protected array $flags from Event

Methods

__construct(string $name, Composer $composer, IOInterface $io, bool $devMode = false, array $args = array(), array $flags = array())

Constructor.

from Event
string
getName()

Returns the event's name.

from Event
array
getArguments()

Returns the event's arguments.

from Event
array
getFlags()

Returns the event's flags.

from Event
bool
isPropagationStopped()

Checks if stopPropagation has been called

from Event
stopPropagation()

Prevents the event from being passed to further listeners

from Event
getComposer()

Returns the composer instance.

from Event
getIO()

Returns the IO instance.

from Event
bool
isDevMode()

Return the dev mode flag

from Event

Details

__construct(string $name, Composer $composer, IOInterface $io, bool $devMode = false, array $args = array(), array $flags = array())

Constructor.

Parameters

string $name The event name
Composer $composer The composer object
IOInterface $io The IOInterface object
bool $devMode Whether or not we are in dev mode
array $args Arguments passed by the user
array $flags Optional flags to pass data not as argument

string getName()

Returns the event's name.

Return Value

string The event name

array getArguments()

Returns the event's arguments.

Return Value

array The event arguments

array getFlags()

Returns the event's flags.

Return Value

array The event flags

bool isPropagationStopped()

Checks if stopPropagation has been called

Return Value

bool Whether propagation has been stopped

stopPropagation()

Prevents the event from being passed to further listeners

Composer getComposer()

Returns the composer instance.

Return Value

Composer

IOInterface getIO()

Returns the IO instance.

Return Value

IOInterface

bool isDevMode()

Return the dev mode flag

Return Value

bool