public static function createFromServerRequest(ServerRequestInterface $request)
    {
        $data = $request->getCookieParams();
        $cookies = [];
        foreach ($data as $name => $value) {
            $cookies[] = new Cookie($name, $value);
        }

        return new static($cookies);
    }
public static function createFromServerRequest(ServerRequestInterface $request)
    {
        $data = $request->getCookieParams();
        $cookies = [];
        foreach ($data as $name => $value) {
            $cookies[] = new Cookie($name, $value);
        }

        return new static($cookies);
    }
public static function createFromServerRequest ( ServerRequestInterface $ request ) { $ data = $ request -> getCookieParams ( ) ; $ cookies = [ ] ; foreach ( $ data as $ name => $ value ) { $ cookies [ ] = new Cookie ( $ name , $ value ) ; } return new static ( $ cookies ) ; }
Create a new collection from the cookies in a ServerRequest

@param \Psr\Http\Message\ServerRequestInterface $request The request to extract cookie data from
@return static
Create a new collection from the cookies in a ServerRequest