createServerRequest($method, $uri, $serverParams); } if (class_exists(SlimServerRequest::class)) { $uri = SlimUri::createFromString($uri); $headers = new SlimHeaders; $body = (new StreamFactory)->createStream(""); return new SlimServerRequest($method, $uri, $headers, [], $serverParams, $body); } if (class_exists(GuzzleServerRequest::class)) { return new GuzzleServerRequest($method, $uri, [], null, "1.1", $serverParams); } throw new \RuntimeException("No PSR-7 implementation available"); } }