private function convertToZfResponse(ResponseInterface $response)
    {
        $zfResponse = new HttpResponse();

        $zfResponse->setStatusCode($response->getStatusCode());
        $zfResponse->setReasonPhrase($response->getReasonPhrase());
        $zfResponse->setContent((string) $response->getBody());

        foreach ($response->getHeaders() as $name => $values) {
            $zfResponse->getHeaders()->addHeaderLine($name, implode(", ", $values));
        }

        return $zfResponse;
    }
private function convertToZfResponse(ResponseInterface $response)
    {
        $zfResponse = new HttpResponse();

        $zfResponse->setStatusCode($response->getStatusCode());
        $zfResponse->setReasonPhrase($response->getReasonPhrase());
        $zfResponse->setContent((string) $response->getBody());

        foreach ($response->getHeaders() as $name => $values) {
            $zfResponse->getHeaders()->addHeaderLine($name, implode(", ", $values));
        }

        return $zfResponse;
    }
private function convertToZfResponse ( ResponseInterface $ response ) { $ zfResponse = new HttpResponse ( ) ; $ zfResponse -> setStatusCode ( $ response -> getStatusCode ( ) ) ; $ zfResponse -> setReasonPhrase ( $ response -> getReasonPhrase ( ) ) ; $ zfResponse -> setContent ( ( string ) $ response -> getBody ( ) ) ; foreach ( $ response -> getHeaders ( ) as $ name => $ values ) { $ zfResponse -> getHeaders ( ) -> addHeaderLine ( $ name , implode ( ", " , $ values ) ) ; } return $ zfResponse ; }
Convert a PSR-7 response to ZF2 response

@param  ResponseInterface $response
@return HttpResponse
Convert a PSR - 7 response to ZF2 response