Chris@0: Chris@0: * Chris@0: * For the full copyright and license information, please view the LICENSE Chris@0: * file that was distributed with this source code. Chris@0: */ Chris@0: Chris@0: namespace Symfony\Component\Console; Chris@0: Chris@0: /** Chris@0: * Contains all events dispatched by an Application. Chris@0: * Chris@0: * @author Francesco Levorato Chris@0: */ Chris@0: final class ConsoleEvents Chris@0: { Chris@0: /** Chris@0: * The COMMAND event allows you to attach listeners before any command is Chris@0: * executed by the console. It also allows you to modify the command, input and output Chris@0: * before they are handled to the command. Chris@0: * Chris@0: * @Event("Symfony\Component\Console\Event\ConsoleCommandEvent") Chris@0: */ Chris@0: const COMMAND = 'console.command'; Chris@0: Chris@0: /** Chris@0: * The TERMINATE event allows you to attach listeners after a command is Chris@0: * executed by the console. Chris@0: * Chris@0: * @Event("Symfony\Component\Console\Event\ConsoleTerminateEvent") Chris@0: */ Chris@0: const TERMINATE = 'console.terminate'; Chris@0: Chris@0: /** Chris@14: * The EXCEPTION event occurs when an uncaught exception appears Chris@14: * while executing Command#run(). Chris@0: * Chris@0: * This event allows you to deal with the exception or Chris@0: * to modify the thrown exception. Chris@0: * Chris@0: * @Event("Symfony\Component\Console\Event\ConsoleExceptionEvent") Chris@0: * Chris@14: * @deprecated The console.exception event is deprecated since version 3.3 and will be removed in 4.0. Use the console.error event instead. Chris@0: */ Chris@0: const EXCEPTION = 'console.exception'; Chris@14: Chris@14: /** Chris@14: * The ERROR event occurs when an uncaught exception or error appears. Chris@14: * Chris@14: * This event allows you to deal with the exception/error or Chris@14: * to modify the thrown exception. Chris@14: * Chris@14: * @Event("Symfony\Component\Console\Event\ConsoleErrorEvent") Chris@14: */ Chris@14: const ERROR = 'console.error'; Chris@0: }