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\HttpKernel ;
/**
* Contains all events thrown in the HttpKernel component .
*
* @ author Bernhard Schussek < bschussek @ gmail . com >
*/
final class KernelEvents
{
/**
* The REQUEST event occurs at the very beginning of request
* dispatching .
*
* This event allows you to create a response for a request before any
2018-11-23 12:29:20 +00:00
* other code in the framework is executed .
2015-08-17 17:00:26 -07:00
*
2018-11-23 12:29:20 +00:00
* @ Event ( " Symfony \ Component \ HttpKernel \ Event \ GetResponseEvent " )
2015-08-17 17:00:26 -07:00
*/
const REQUEST = 'kernel.request' ;
/**
* The EXCEPTION event occurs when an uncaught exception appears .
*
* This event allows you to create a response for a thrown 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 \ HttpKernel \ Event \ GetResponseForExceptionEvent " )
2015-08-17 17:00:26 -07:00
*/
const EXCEPTION = 'kernel.exception' ;
/**
* The VIEW event occurs when the return value of a controller
* is not a Response instance .
*
* This event allows you to create a response for the return value of the
2018-11-23 12:29:20 +00:00
* controller .
2015-08-17 17:00:26 -07:00
*
2018-11-23 12:29:20 +00:00
* @ Event ( " Symfony \ Component \ HttpKernel \ Event \ GetResponseForControllerResultEvent " )
2015-08-17 17:00:26 -07:00
*/
const VIEW = 'kernel.view' ;
/**
* The CONTROLLER event occurs once a controller was found for
* handling a request .
*
* This event allows you to change the controller that will handle the
2018-11-23 12:29:20 +00:00
* request .
2015-08-17 17:00:26 -07:00
*
2018-11-23 12:29:20 +00:00
* @ Event ( " Symfony \ Component \ HttpKernel \ Event \ FilterControllerEvent " )
2015-08-17 17:00:26 -07:00
*/
const CONTROLLER = 'kernel.controller' ;
2018-11-23 12:29:20 +00:00
/**
* The CONTROLLER_ARGUMENTS event occurs once controller arguments have been resolved .
*
* This event allows you to change the arguments that will be passed to
* the controller .
*
* @ Event ( " Symfony \ Component \ HttpKernel \ Event \ FilterControllerArgumentsEvent " )
*/
const CONTROLLER_ARGUMENTS = 'kernel.controller_arguments' ;
2015-08-17 17:00:26 -07:00
/**
* The RESPONSE event occurs once a response was created for
* replying to a request .
*
* This event allows you to modify or replace the response that will be
2018-11-23 12:29:20 +00:00
* replied .
2015-08-17 17:00:26 -07:00
*
2018-11-23 12:29:20 +00:00
* @ Event ( " Symfony \ Component \ HttpKernel \ Event \ FilterResponseEvent " )
2015-08-17 17:00:26 -07:00
*/
const RESPONSE = 'kernel.response' ;
/**
* The TERMINATE event occurs once a response was sent .
*
* This event allows you to run expensive post - response jobs .
*
2018-11-23 12:29:20 +00:00
* @ Event ( " Symfony \ Component \ HttpKernel \ Event \ PostResponseEvent " )
2015-08-17 17:00:26 -07:00
*/
const TERMINATE = 'kernel.terminate' ;
/**
* The FINISH_REQUEST event occurs when a response was generated for a request .
*
* This event allows you to reset the global and environmental state of
* the application , when it was changed during the request .
*
2018-11-23 12:29:20 +00:00
* @ Event ( " Symfony \ Component \ HttpKernel \ Event \ FinishRequestEvent " )
2015-08-17 17:00:26 -07:00
*/
const FINISH_REQUEST = 'kernel.finish_request' ;
}