public function onRequest(GetResponseEvent $event)
    {
        if (!$event->isMasterRequest()) {
            return;
        }

        $request = $event->getRequest();
        $request->setSession($this->session);

        $this->prependBasePathToCookie($request);
        $this->appendRealmToName($request);

        $name = $this->session->getName();
        if ($request->cookies->has($name)) {
            $this->session->setId($request->cookies->get($name));
            $this->session->start();
        }
    }
public function onRequest(GetResponseEvent $event)
    {
        if (!$event->isMasterRequest()) {
            return;
        }

        $request = $event->getRequest();
        $request->setSession($this->session);

        $this->prependBasePathToCookie($request);
        $this->appendRealmToName($request);

        $name = $this->session->getName();
        if ($request->cookies->has($name)) {
            $this->session->setId($request->cookies->get($name));
            $this->session->start();
        }
    }
public function onRequest ( GetResponseEvent $ event ) { if ( ! $ event -> isMasterRequest ( ) ) { return ; } $ request = $ event -> getRequest ( ) ; $ request -> setSession ( $ this -> session ) ; $ this -> prependBasePathToCookie ( $ request ) ; $ this -> appendRealmToName ( $ request ) ; $ name = $ this -> session -> getName ( ) ; if ( $ request -> cookies -> has ( $ name ) ) { $ this -> session -> setId ( $ request -> cookies -> get ( $ name ) ) ; $ this -> session -> start ( ) ; } }
Set the session ID from request cookies.

@param GetResponseEvent $event
Set the session ID from request cookies .