1 | <?php |
||
15 | final class ApplicationSubscriber implements EventSubscriberInterface |
||
16 | { |
||
17 | |||
18 | /** |
||
19 | * @var EventStateStorage |
||
20 | */ |
||
21 | private $eventStateStorage; |
||
22 | |||
23 | |||
24 | public function __construct(EventStateStorage $eventStateStorage) |
||
28 | |||
29 | |||
30 | /** |
||
31 | * {@inheritdoc} |
||
32 | */ |
||
33 | public static function getSubscribedEvents() |
||
34 | { |
||
35 | return [ |
||
36 | NetteApplicationEvents::ON_REQUEST => 'onRequest', |
||
37 | NetteApplicationEvents::ON_STARTUP => 'onStartup', |
||
38 | NetteApplicationEvents::ON_PRESENTER => 'onPresenter', |
||
39 | NetteApplicationEvents::ON_SHUTDOWN => 'onShutdown', |
||
40 | NetteApplicationEvents::ON_RESPONSE => 'onResponse', |
||
41 | NetteApplicationEvents::ON_ERROR => 'onError' |
||
42 | ]; |
||
43 | } |
||
44 | |||
45 | |||
46 | public function onRequest(ApplicationRequestEvent $applicationRequestEvent) |
||
50 | |||
51 | |||
52 | public function onStartup(ApplicationEvent $applicationEvent) |
||
56 | |||
57 | |||
58 | public function onPresenter(ApplicationPresenterEvent $applicationPresenterEvent) |
||
62 | |||
63 | |||
64 | public function onShutdown(ApplicationExceptionEvent $applicationExceptionEvent) |
||
68 | |||
69 | |||
70 | public function onError(ApplicationExceptionEvent $applicationExceptionEvent) |
||
74 | |||
75 | |||
76 | public function onResponse(ApplicationResponseEvent $applicationResponseEvent) |
||
80 | |||
81 | } |
||
82 |