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