34 http_response_code($response->getStatusCode());
37 foreach ($response->getHeaders() as $key => $header) {
38 header(
"$key: " . $response->getHeaderLine($key));
42 $response->getBody()->rewind();
45 $resource = $response->getBody()->detach();
49 if (is_resource($resource)) {
52 $sendStatus = fpassthru($resource);
59 if ($sendStatus ===
false) {
Interface ResponseSenderStrategy.
sendResponse(ResponseInterface $response)
Sends the rendered response to the client.
Class DefaultResponseSenderStrategy.