public function read(Request $request)
    {
        if (!$request->cookies->has($this->cookieSettings->getName())) {
            return null;
        }

        return $this->createCookieWithValue(
            $request->cookies->get($this->cookieSettings->getName())
        );
    }
public function read(Request $request)
    {
        if (!$request->cookies->has($this->cookieSettings->getName())) {
            return null;
        }

        return $this->createCookieWithValue(
            $request->cookies->get($this->cookieSettings->getName())
        );
    }
public function read ( Request $ request ) { if ( ! $ request -> cookies -> has ( $ this -> cookieSettings -> getName ( ) ) ) { return null ; } return $ this -> createCookieWithValue ( $ request -> cookies -> get ( $ this -> cookieSettings -> getName ( ) ) ) ; }
Retrieve the current cookie from the Request if it exists.

Note that we only read the value, we ignore the other settings.

@param Request $request
@return null|Cookie
Retrieve the current cookie from the Request if it exists .