Conditions | 3 |
Paths | 3 |
Total Lines | 12 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
30 | public function onSetLocale(GetResponseForExceptionEvent $event) |
||
31 | { |
||
32 | if (!$event->isMasterRequest()) { |
||
33 | return; |
||
34 | } |
||
35 | |||
36 | if ($event->getException() instanceof NotFoundHttpException) { |
||
37 | $event->getRequest()->setLocale( |
||
38 | $this->resolver->getLocale($event->getRequest()) |
||
39 | ); |
||
40 | } |
||
41 | } |
||
42 | } |
||
43 |