Attribute
2 years ago
Bundle
1 year ago
CacheClearer
2 years ago
CacheWarmer
1 year ago
Config
1 year ago
Controller
1 year ago
ControllerMetadata
1 year ago
DataCollector
1 year ago
Debug
1 year ago
DependencyInjection
1 year ago
Event
1 year ago
EventListener
1 year ago
Exception
1 year ago
Fragment
1 year ago
HttpCache
1 year ago
Log
1 year ago
Profiler
1 year ago
Resources
2 years ago
HttpClientKernel.php
1 year ago
HttpKernel.php
1 year ago
HttpKernelBrowser.php
1 year ago
HttpKernelInterface.php
1 year ago
Kernel.php
1 month ago
KernelEvents.php
2 years ago
KernelInterface.php
2 years ago
LICENSE
2 years ago
README.md
2 years ago
RebootableInterface.php
2 years ago
TerminableInterface.php
2 years ago
UriSigner.php
1 year ago
KernelEvents.php
110 lines
| 1 | <?php |
| 2 | |
| 3 | /* |
| 4 | * This file is part of the Symfony package. |
| 5 | * |
| 6 | * (c) Fabien Potencier <fabien@symfony.com> |
| 7 | * |
| 8 | * For the full copyright and license information, please view the LICENSE |
| 9 | * file that was distributed with this source code. |
| 10 | */ |
| 11 | namespace Matomo\Dependencies\Symfony\Component\HttpKernel; |
| 12 | |
| 13 | use Matomo\Dependencies\Symfony\Component\HttpKernel\Event\ControllerArgumentsEvent; |
| 14 | use Matomo\Dependencies\Symfony\Component\HttpKernel\Event\ControllerEvent; |
| 15 | use Matomo\Dependencies\Symfony\Component\HttpKernel\Event\ExceptionEvent; |
| 16 | use Matomo\Dependencies\Symfony\Component\HttpKernel\Event\FinishRequestEvent; |
| 17 | use Matomo\Dependencies\Symfony\Component\HttpKernel\Event\RequestEvent; |
| 18 | use Matomo\Dependencies\Symfony\Component\HttpKernel\Event\ResponseEvent; |
| 19 | use Matomo\Dependencies\Symfony\Component\HttpKernel\Event\TerminateEvent; |
| 20 | use Matomo\Dependencies\Symfony\Component\HttpKernel\Event\ViewEvent; |
| 21 | /** |
| 22 | * Contains all events thrown in the HttpKernel component. |
| 23 | * |
| 24 | * @author Bernhard Schussek <bschussek@gmail.com> |
| 25 | */ |
| 26 | final class KernelEvents |
| 27 | { |
| 28 | /** |
| 29 | * The REQUEST event occurs at the very beginning of request |
| 30 | * dispatching. |
| 31 | * |
| 32 | * This event allows you to create a response for a request before any |
| 33 | * other code in the framework is executed. |
| 34 | * |
| 35 | * @Event("Symfony\Component\HttpKernel\Event\RequestEvent") |
| 36 | */ |
| 37 | public const REQUEST = 'kernel.request'; |
| 38 | /** |
| 39 | * The EXCEPTION event occurs when an uncaught exception appears. |
| 40 | * |
| 41 | * This event allows you to create a response for a thrown exception or |
| 42 | * to modify the thrown exception. |
| 43 | * |
| 44 | * @Event("Symfony\Component\HttpKernel\Event\ExceptionEvent") |
| 45 | */ |
| 46 | public const EXCEPTION = 'kernel.exception'; |
| 47 | /** |
| 48 | * The CONTROLLER event occurs once a controller was found for |
| 49 | * handling a request. |
| 50 | * |
| 51 | * This event allows you to change the controller that will handle the |
| 52 | * request. |
| 53 | * |
| 54 | * @Event("Symfony\Component\HttpKernel\Event\ControllerEvent") |
| 55 | */ |
| 56 | public const CONTROLLER = 'kernel.controller'; |
| 57 | /** |
| 58 | * The CONTROLLER_ARGUMENTS event occurs once controller arguments have been resolved. |
| 59 | * |
| 60 | * This event allows you to change the arguments that will be passed to |
| 61 | * the controller. |
| 62 | * |
| 63 | * @Event("Symfony\Component\HttpKernel\Event\ControllerArgumentsEvent") |
| 64 | */ |
| 65 | public const CONTROLLER_ARGUMENTS = 'kernel.controller_arguments'; |
| 66 | /** |
| 67 | * The VIEW event occurs when the return value of a controller |
| 68 | * is not a Response instance. |
| 69 | * |
| 70 | * This event allows you to create a response for the return value of the |
| 71 | * controller. |
| 72 | * |
| 73 | * @Event("Symfony\Component\HttpKernel\Event\ViewEvent") |
| 74 | */ |
| 75 | public const VIEW = 'kernel.view'; |
| 76 | /** |
| 77 | * The RESPONSE event occurs once a response was created for |
| 78 | * replying to a request. |
| 79 | * |
| 80 | * This event allows you to modify or replace the response that will be |
| 81 | * replied. |
| 82 | * |
| 83 | * @Event("Symfony\Component\HttpKernel\Event\ResponseEvent") |
| 84 | */ |
| 85 | public const RESPONSE = 'kernel.response'; |
| 86 | /** |
| 87 | * The FINISH_REQUEST event occurs when a response was generated for a request. |
| 88 | * |
| 89 | * This event allows you to reset the global and environmental state of |
| 90 | * the application, when it was changed during the request. |
| 91 | * |
| 92 | * @Event("Symfony\Component\HttpKernel\Event\FinishRequestEvent") |
| 93 | */ |
| 94 | public const FINISH_REQUEST = 'kernel.finish_request'; |
| 95 | /** |
| 96 | * The TERMINATE event occurs once a response was sent. |
| 97 | * |
| 98 | * This event allows you to run expensive post-response jobs. |
| 99 | * |
| 100 | * @Event("Symfony\Component\HttpKernel\Event\TerminateEvent") |
| 101 | */ |
| 102 | public const TERMINATE = 'kernel.terminate'; |
| 103 | /** |
| 104 | * Event aliases. |
| 105 | * |
| 106 | * These aliases can be consumed by RegisterListenersPass. |
| 107 | */ |
| 108 | public const ALIASES = [ControllerArgumentsEvent::class => self::CONTROLLER_ARGUMENTS, ControllerEvent::class => self::CONTROLLER, ResponseEvent::class => self::RESPONSE, FinishRequestEvent::class => self::FINISH_REQUEST, RequestEvent::class => self::REQUEST, ViewEvent::class => self::VIEW, ExceptionEvent::class => self::EXCEPTION, TerminateEvent::class => self::TERMINATE]; |
| 109 | } |
| 110 |