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);
    }