src/Parser/ResponseParser.php
public function parse($content)
    {
        $content = $this->normalize($content);

        list($scheme, $code, $message) = $this->getStatus($content);

        $response = new Response();
        $response->setProtocolVersion($scheme);
        $response->setStatus($code, $message);

        list($header, $body) = $this->splitMessage($content);

        $this->headerToArray($response, $header);

        $response->setBody(new StringStream($body));

        return $response;
    }
public function parse($content)
    {
        $content = $this->normalize($content);

        list($scheme, $code, $message) = $this->getStatus($content);

        $response = new Response();
        $response->setProtocolVersion($scheme);
        $response->setStatus($code, $message);

        list($header, $body) = $this->splitMessage($content);

        $this->headerToArray($response, $header);

        $response->setBody(new StringStream($body));

        return $response;
    }
public function parse ( $ content ) { $ content = $ this -> normalize ( $ content ) ; list ( $ scheme , $ code , $ message ) = $ this -> getStatus ( $ content ) ; $ response = new Response ( ) ; $ response -> setProtocolVersion ( $ scheme ) ; $ response -> setStatus ( $ code , $ message ) ; list ( $ header , $ body ) = $ this -> splitMessage ( $ content ) ; $ this -> headerToArray ( $ response , $ header ) ; $ response -> setBody ( new StringStream ( $ body ) ) ; return $ response ; }
Converts an raw http response into an PSX\Http\Response object

@param string $content
@return \PSX\Http\ResponseInterface
@throws \PSX\Http\Parser\ParseException
Converts an raw http response into an PSX \ Http \ Response object