ConsoleExceptionEvent

class ConsoleExceptionEvent extends ConsoleEvent Allows to handle exception thrown in a command. Methods bool isPropagationStopped() Returns whether further event listeners should be triggered. from Event stopPropagation() Stops the propagation of the event to further event listeners. from Event setDispatcher(EventDispatcherInterface $dispatcher) deprecated Stores the EventDispatcher that dispatches this Event. from Event EventDispatcherInterface getDispatcher() deprecated Re

ConsoleEvent::getInput()

InputInterface getInput() Gets the input instance. Return Value InputInterface An InputInterface instance

ConsoleEvent::getOutput()

OutputInterface getOutput() Gets the output instance. Return Value OutputInterface An OutputInterface instance

ConsoleEvent::getCommand()

Command getCommand() Gets the command that is executed. Return Value Command A Command instance

ConsoleEvents

class ConsoleEvents Contains all events dispatched by an Application. Constants COMMAND The COMMAND event allows you to attach listeners before any command is executed by the console. It also allows you to modify the command, input and output before they are handled to the command. TERMINATE The TERMINATE event allows you to attach listeners after a command is executed by the console. EXCEPTION The EXCEPTION event occurs when an uncaught exception appears. This event allows you to de

ConsoleEvent

class ConsoleEvent extends Event Allows to inspect input and output of a command. Methods Boolean isPropagationStopped() Returns whether further event listeners should be triggered. from Event stopPropagation() Stops the propagation of the event to further event listeners. from Event setDispatcher(EventDispatcherInterface $dispatcher) Stores the EventDispatcher that dispatches this Event from Event EventDispatcherInterface getDispatcher() Returns the EventDispatcher that disp

ConsoleCommandEvent::disableCommand()

bool disableCommand() Disables the command, so it won't be run. Return Value bool

ConsoleCommandEvent::commandShouldRun()

bool commandShouldRun() Returns true if the command is runnable, false otherwise. Return Value bool

ConsoleCommandEvent::enableCommand()

bool enableCommand() Enables the command. Return Value bool

ConsoleCommandEvent

class ConsoleCommandEvent extends ConsoleEvent Allows to do things before the command is executed, like skipping the command or changing the input. Constants RETURN_CODE_DISABLED The return code for skipped commands, this will also be passed into the terminate event. Methods bool isPropagationStopped() Returns whether further event listeners should be triggered. from Event stopPropagation() Stops the propagation of the event to further event listeners. from Event setDispatch