final class ResponseEmitter (View source)

Emits PSR-7 responses by forwarding readable body chunks without materializing the full body

Constants

private READ_CHUNK_SIZE

Methods

void
emit(ResponseInterface $response, ServerRequestInterface|null $request = null)

Sends the response status and headers, then emits readable body chunks except for HEAD requests

void

Details

emit

void emit(ResponseInterface $response, ServerRequestInterface|null $request = null)

Sends the response status and headers, then emits readable body chunks except for HEAD requests

Parameters

ResponseInterface $response
ServerRequestInterface|null $request

Return Value

void