public function emit(ResponseInterface $response)
    {
        $filename = $linenum = null;
        if (headers_sent($filename, $linenum)) {
            throw new RuntimeException(sprintf(
                'Unable to emit response; headers already sent in "%s" '
                . 'on line "%s".',
                $filename,
                $linenum
            ));
        }
        $this
            ->emitStatusLine($response)
            ->emitHeaders($response)
            ->emitBody($response);
    }
public function emit(ResponseInterface $response)
    {
        $filename = $linenum = null;
        if (headers_sent($filename, $linenum)) {
            throw new RuntimeException(sprintf(
                'Unable to emit response; headers already sent in "%s" '
                . 'on line "%s".',
                $filename,
                $linenum
            ));
        }
        $this
            ->emitStatusLine($response)
            ->emitHeaders($response)
            ->emitBody($response);
    }
public function emit ( ResponseInterface $ response ) { $ filename = $ linenum = null ; if ( headers_sent ( $ filename , $ linenum ) ) { throw new RuntimeException ( sprintf ( 'Unable to emit response; headers already sent in "%s" ' . 'on line "%s".' , $ filename , $ linenum ) ) ; } $ this -> emitStatusLine ( $ response ) -> emitHeaders ( $ response ) -> emitBody ( $ response ) ; }
Emits the response.

@param \Psr\Http\Message\ResponseInterface $response The response

@throws \RuntimeException If headers is already sent
Emits the response .