src/Application.php
protected function emit(ServerRequestInterface $request)
    {
        $response = $this->handle($request);

        $code = (string) $response->getStatusCode();

        $code .= ' ' . $response->getReasonPhrase();

        $headers = (array) $response->getHeaders();

        $version = $response->getProtocolVersion();

        header('HTTP/' . $version . ' ' . $code);

        foreach ($headers as $name => $values) {
            $value = (string) implode(',', $values);

            header((string) $name . ': ' . $value);
        }

        return $response;
    }
protected function emit(ServerRequestInterface $request)
    {
        $response = $this->handle($request);

        $code = (string) $response->getStatusCode();

        $code .= ' ' . $response->getReasonPhrase();

        $headers = (array) $response->getHeaders();

        $version = $response->getProtocolVersion();

        header('HTTP/' . $version . ' ' . $code);

        foreach ($headers as $name => $values) {
            $value = (string) implode(',', $values);

            header((string) $name . ': ' . $value);
        }

        return $response;
    }
protected function emit ( ServerRequestInterface $ request ) { $ response = $ this -> handle ( $ request ) ; $ code = ( string ) $ response -> getStatusCode ( ) ; $ code .= ' ' . $ response -> getReasonPhrase ( ) ; $ headers = ( array ) $ response -> getHeaders ( ) ; $ version = $ response -> getProtocolVersion ( ) ; header ( 'HTTP/' . $ version . ' ' . $ code ) ; foreach ( $ headers as $ name => $ values ) { $ value = ( string ) implode ( ',' , $ values ) ; header ( ( string ) $ name . ': ' . $ value ) ; } return $ response ; }
Emits the headers based from the response.
NOTE: To be removed in v1.0.0. Should be included in run().

@param  \Psr\Http\Message\ServerRequestInterface $request
@return \Psr\Http\Message\ResponseInterface
Emits the headers based from the response . NOTE : To be removed in v1 . 0 . 0 . Should be included in run () .