Drupal investigation

KernelEvents.php 3.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. <?php
  2. /*
  3. * This file is part of the Symfony package.
  4. *
  5. * (c) Fabien Potencier <fabien@symfony.com>
  6. *
  7. * For the full copyright and license information, please view the LICENSE
  8. * file that was distributed with this source code.
  9. */
  10. namespace Symfony\Component\HttpKernel;
  11. /**
  12. * Contains all events thrown in the HttpKernel component.
  13. *
  14. * @author Bernhard Schussek <bschussek@gmail.com>
  15. */
  16. final class KernelEvents
  17. {
  18. /**
  19. * The REQUEST event occurs at the very beginning of request
  20. * dispatching.
  21. *
  22. * This event allows you to create a response for a request before any
  23. * other code in the framework is executed. The event listener method
  24. * receives a Symfony\Component\HttpKernel\Event\GetResponseEvent
  25. * instance.
  26. *
  27. * @Event
  28. *
  29. * @var string
  30. */
  31. const REQUEST = 'kernel.request';
  32. /**
  33. * The EXCEPTION event occurs when an uncaught exception appears.
  34. *
  35. * This event allows you to create a response for a thrown exception or
  36. * to modify the thrown exception. The event listener method receives
  37. * a Symfony\Component\HttpKernel\Event\GetResponseForExceptionEvent
  38. * instance.
  39. *
  40. * @Event
  41. *
  42. * @var string
  43. */
  44. const EXCEPTION = 'kernel.exception';
  45. /**
  46. * The VIEW event occurs when the return value of a controller
  47. * is not a Response instance.
  48. *
  49. * This event allows you to create a response for the return value of the
  50. * controller. The event listener method receives a
  51. * Symfony\Component\HttpKernel\Event\GetResponseForControllerResultEvent
  52. * instance.
  53. *
  54. * @Event
  55. *
  56. * @var string
  57. */
  58. const VIEW = 'kernel.view';
  59. /**
  60. * The CONTROLLER event occurs once a controller was found for
  61. * handling a request.
  62. *
  63. * This event allows you to change the controller that will handle the
  64. * request. The event listener method receives a
  65. * Symfony\Component\HttpKernel\Event\FilterControllerEvent instance.
  66. *
  67. * @Event
  68. *
  69. * @var string
  70. */
  71. const CONTROLLER = 'kernel.controller';
  72. /**
  73. * The RESPONSE event occurs once a response was created for
  74. * replying to a request.
  75. *
  76. * This event allows you to modify or replace the response that will be
  77. * replied. The event listener method receives a
  78. * Symfony\Component\HttpKernel\Event\FilterResponseEvent instance.
  79. *
  80. * @Event
  81. *
  82. * @var string
  83. */
  84. const RESPONSE = 'kernel.response';
  85. /**
  86. * The TERMINATE event occurs once a response was sent.
  87. *
  88. * This event allows you to run expensive post-response jobs.
  89. * The event listener method receives a
  90. * Symfony\Component\HttpKernel\Event\PostResponseEvent instance.
  91. *
  92. * @Event
  93. *
  94. * @var string
  95. */
  96. const TERMINATE = 'kernel.terminate';
  97. /**
  98. * The FINISH_REQUEST event occurs when a response was generated for a request.
  99. *
  100. * This event allows you to reset the global and environmental state of
  101. * the application, when it was changed during the request.
  102. * The event listener method receives a
  103. * Symfony\Component\HttpKernel\Event\FinishRequestEvent instance.
  104. *
  105. * @Event
  106. *
  107. * @var string
  108. */
  109. const FINISH_REQUEST = 'kernel.finish_request';
  110. }