src/Charcoal/App/Handler/AbstractHandler.php
protected function respondWith(ResponseInterface $response, $contentType, $output)
    {
        $body = new Body(fopen('php://temp', 'r+'));
        $body->write($output);

        return $response->withHeader('Content-Type', $contentType)
            ->withBody($body);
    }
protected function respondWith(ResponseInterface $response, $contentType, $output)
    {
        $body = new Body(fopen('php://temp', 'r+'));
        $body->write($output);

        return $response->withHeader('Content-Type', $contentType)
            ->withBody($body);
    }
protected function respondWith ( ResponseInterface $ response , $ contentType , $ output ) { $ body = new Body ( fopen ( 'php://temp' , 'r+' ) ) ; $ body -> write ( $ output ) ; return $ response -> withHeader ( 'Content-Type' , $ contentType ) -> withBody ( $ body ) ; }
Mutate the given response.

@param  ResponseInterface $response    The most recent Response object.
@param  string            $contentType The content type of the output.
@param  string            $output      The text output.
@return ResponseInterface
Mutate the given response .