IterableStreamedResponse
class IterableStreamedResponse extends StreamedResponse
Retain iterable chunks so the Swoole bridge can stop production after a failed write.
Methods
__construct(iterable $chunks, int $status = 200, array $headers = [])
Create a new iterable streamed response.
setChunks(iterable $chunks)
Set the chunks associated with the response.
setCallback(callable $callback)
Set the callback associated with the response.
sendContent()
Send the response content.
Details
at line 27
__construct(iterable $chunks, int $status = 200, array $headers = [])
Create a new iterable streamed response.
at line 39
IterableStreamedResponse
setChunks(iterable $chunks)
Set the chunks associated with the response.
at line 50
IterableStreamedResponse
setCallback(callable $callback)
Set the callback associated with the response.
at line 61
IterableStreamedResponse
sendContent()
Send the response content.
at line 88
bool
streamTo(Closure $write)
| internal |
Stream retained chunks through the given writer.