public function LocaleListener::setRequest in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/symfony/http-kernel/EventListener/LocaleListener.php \Symfony\Component\HttpKernel\EventListener\LocaleListener::setRequest()
Sets the current Request.
This method was used to synchronize the Request, but as the HttpKernel is doing that automatically now, you should never call it directly. It is kept public for BC with the 2.3 version.
Parameters
Request|null $request A Request instance:
Deprecated
since version 2.4, to be removed in 3.0.
File
- vendor/
symfony/ http-kernel/ EventListener/ LocaleListener.php, line 59
Class
- LocaleListener
- Initializes the locale based on the current request.
Namespace
Symfony\Component\HttpKernel\EventListenerCode
public function setRequest(Request $request = null) {
@trigger_error('The ' . __METHOD__ . ' method is deprecated since version 2.4 and will be removed in 3.0.', E_USER_DEPRECATED);
if (null === $request) {
return;
}
$this
->setLocale($request);
$this
->setRouterContext($request);
}