src/HttpConverter.php
public function toXmlResponse(ApiProblem $problem) : ResponseInterface
    {
        $response = $this->toResponse($problem);

        $body = $response->getBody();
        $body->write($problem->asXml($this->pretty));
        $body->rewind();

        return $this->toResponse($problem)
            ->withHeader('Content-Type', ApiProblem::CONTENT_TYPE_XML)
            ->withBody($body);
    }
public function toXmlResponse(ApiProblem $problem) : ResponseInterface
    {
        $response = $this->toResponse($problem);

        $body = $response->getBody();
        $body->write($problem->asXml($this->pretty));
        $body->rewind();

        return $this->toResponse($problem)
            ->withHeader('Content-Type', ApiProblem::CONTENT_TYPE_XML)
            ->withBody($body);
    }
public function toXmlResponse ( ApiProblem $ problem ) : ResponseInterface { $ response = $ this -> toResponse ( $ problem ) ; $ body = $ response -> getBody ( ) ; $ body -> write ( $ problem -> asXml ( $ this -> pretty ) ) ; $ body -> rewind ( ) ; return $ this -> toResponse ( $ problem ) -> withHeader ( 'Content-Type' , ApiProblem :: CONTENT_TYPE_XML ) -> withBody ( $ body ) ; }
Converts a problem to an XML HTTP Response object, provided.

@param ApiProblem $problem
The problem to convert.

@return ResponseInterface
The appropriate response object.
Converts a problem to an XML HTTP Response object provided .