Composer API
Class

Composer\Script\Event

class Event extends Event

The script event class

Methods

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

Constructor.

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
Composer getComposer()

Returns the composer instance.

IOInterface getIO()

Returns the IO instance.

bool isDevMode()

Return the dev mode flag

Details

at line 52
public __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

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 bool isPropagationStopped()

Checks if stopPropagation has been called

Return Value

bool Whether propagation has been stopped

in Event at line 99
public stopPropagation()

Prevents the event from being passed to further listeners

at line 65
public Composer getComposer()

Returns the composer instance.

Return Value

Composer

at line 75
public IOInterface getIO()

Returns the IO instance.

Return Value

IOInterface

at line 85
public bool isDevMode()

Return the dev mode flag

Return Value

bool