1 | <?php |
||
23 | class LocaleSubscriber implements EventSubscriberInterface |
||
24 | { |
||
25 | /** |
||
26 | * The default locale. |
||
27 | * |
||
28 | * @var string |
||
29 | */ |
||
30 | private $defaultLocale; |
||
31 | |||
32 | /** |
||
33 | * @param string $defaultLocale |
||
34 | */ |
||
35 | public function __construct(string $defaultLocale = 'en') |
||
39 | |||
40 | /** |
||
41 | * Kernel request. |
||
42 | * |
||
43 | * @param GetResponseEvent $event |
||
44 | */ |
||
45 | public function onKernelRequest(GetResponseEvent $event) |
||
60 | |||
61 | /** |
||
62 | * Subscribed events. |
||
63 | * |
||
64 | * @return array |
||
65 | */ |
||
66 | public static function getSubscribedEvents() |
||
73 | } |
||
74 |