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.

The event listener method receives a Symfony\Component\Console\Event\ConsoleCommandEvent instance.

TERMINATE

The TERMINATE event allows you to attach listeners after a command is executed by the console.

The event listener method receives a Symfony\Component\Console\Event\ConsoleTerminateEvent instance.

EXCEPTION

The EXCEPTION event occurs when an uncaught exception appears.

This event allows you to deal with the exception or to modify the thrown exception. The event listener method receives a Symfony\Component\Console\Event\ConsoleExceptionEvent instance.

© 2004–2017 Fabien Potencier
Licensed under the MIT License.
http://api.symfony.com/2.7/Symfony/Component/Console/ConsoleEvents.html