src/SapiStreamEmitter.php
/**
     * Sends the message body of the response.
     *
     * @param \Psr\Http\Message\ResponseInterface $response
     * @param int                                 $maxBufferLength
     */
Sends the message body of the response.
Sends the message body of the response .
private function sendBody(ResponseInterface $response, int $maxBufferLength): void
    {
        $body = $response->getBody();
        if ($body->isSeekable()) {
            $body->rewind();
        }
        if (! $body->isReadable()) {
            echo $body;
            return;
        }
        while (! $body->eof()) {
            echo $body->read($maxBufferLength);
        }
    }
private function sendBody ( ResponseInterface $ response , int $ maxBufferLength ) : void { $ body = $ response -> getBody ( ) ; if ( $ body -> isSeekable ( ) ) { $ body -> rewind ( ) ; } if ( ! $ body -> isReadable ( ) ) { echo $ body ; return ; } while ( ! $ body -> eof ( ) ) { echo $ body -> read ( $ maxBufferLength ) ; } }
Sends the message body of the response.
Sends the message body of the response .