- Full name:
\App\Shared\Http\StreamedResponse - Parent class:
Response
Properties
callback
streamed
headersSent
Methods
__construct
Parameters:
| Parameter | Type | Description |
|---|---|---|
$callback |
?callable | |
$status |
int | The HTTP status code (200 "OK" by default) |
$headers |
array |
setCallback
Sets the PHP callback associated with this Response.
Parameters:
| Parameter | Type | Description |
|---|---|---|
$callback |
callable |
getCallback
sendHeaders
This method only sends the headers once.
Parameters:
| Parameter | Type | Description |
|---|---|---|
$statusCode |
positive-int|null | The status code to use, override the statusCode property if set and not null |
sendContent
This method only sends the content once.
setContent
Parameters:
| Parameter | Type | Description |
|---|---|---|
$content |
?string |
Throws:
when the content is not null
- LogicException