2015-08-17 17:00:26 -07:00
< ? php
/*
* This file is part of the Symfony package .
*
* ( c ) Fabien Potencier < fabien @ symfony . com >
*
* For the full copyright and license information , please view the LICENSE
* file that was distributed with this source code .
*/
namespace Symfony\Component\Console ;
/**
* Contains all events dispatched by an Application .
*
* @ author Francesco Levorato < git @ flevour . net >
*/
final class ConsoleEvents
{
/**
* 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 .
*
2018-11-23 12:29:20 +00:00
* @ Event ( " Symfony \ Component \ Console \ Event \ ConsoleCommandEvent " )
2015-08-17 17:00:26 -07:00
*/
const COMMAND = 'console.command' ;
/**
* The TERMINATE event allows you to attach listeners after a command is
* executed by the console .
*
2018-11-23 12:29:20 +00:00
* @ Event ( " Symfony \ Component \ Console \ Event \ ConsoleTerminateEvent " )
2015-08-17 17:00:26 -07:00
*/
const TERMINATE = 'console.terminate' ;
/**
2018-11-23 12:29:20 +00:00
* The EXCEPTION event occurs when an uncaught exception appears
* while executing Command #run().
2015-08-17 17:00:26 -07:00
*
* This event allows you to deal with the exception or
2018-11-23 12:29:20 +00:00
* to modify the thrown exception .
2015-08-17 17:00:26 -07:00
*
2018-11-23 12:29:20 +00:00
* @ Event ( " Symfony \ Component \ Console \ Event \ ConsoleExceptionEvent " )
2015-08-17 17:00:26 -07:00
*
2018-11-23 12:29:20 +00:00
* @ deprecated The console . exception event is deprecated since version 3.3 and will be removed in 4.0 . Use the console . error event instead .
2015-08-17 17:00:26 -07:00
*/
const EXCEPTION = 'console.exception' ;
2018-11-23 12:29:20 +00:00
/**
* The ERROR event occurs when an uncaught exception or error appears .
*
* This event allows you to deal with the exception / error or
* to modify the thrown exception .
*
* @ Event ( " Symfony \ Component \ Console \ Event \ ConsoleErrorEvent " )
*/
const ERROR = 'console.error' ;
2015-08-17 17:00:26 -07:00
}