Composer API
Class

Composer\Script\CommandEvent

class CommandEvent extends Event

The Command Event.

Methods

__construct(string $name, Composer $composer, IOInterface $io, boolean $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
boolean isPropagationStopped()

Checks if stopPropagation has been called

from Event
stopPropagation()

Prevents the event from being passed to further listeners

from Event
Composer getComposer()

Returns the composer instance.

from Event
IOInterface getIO()

Returns the IO instance.

from Event
boolean isDevMode()

Return the dev mode flag

from Event

Details

in Event at line 52
public __construct(string $name, Composer $composer, IOInterface $io, boolean $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
boolean $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

in Event at line 61
public string getName()

Returns the event's name.

Return Value

string The event name

in Event at line 71
public array getArguments()

Returns the event's arguments.

Return Value

array The event arguments

in Event at line 81
public array getFlags()

Returns the event's flags.

Return Value

array The event flags

in Event at line 91
public boolean isPropagationStopped()

Checks if stopPropagation has been called

Return Value

boolean Whether propagation has been stopped

in Event at line 99
public stopPropagation()

Prevents the event from being passed to further listeners

in Event at line 65
public Composer getComposer()

Returns the composer instance.

Return Value

Composer

in Event at line 75
public IOInterface getIO()

Returns the IO instance.

Return Value

IOInterface

in Event at line 85
public boolean isDevMode()

Return the dev mode flag

Return Value

boolean