|
| __construct (protected Psr\Http\Message\ResponseInterface $psr_response) |
|
| __call ($name, $value) |
|
| getPsrResponse () |
|
| output () |
|
| set_body ($body) |
|
| set_status ($status, $reason=null) |
|
| add_header ($key, $value) |
|
| __construct (string $body='', array $headers=[], ?int $status=null, ?string $reason=null) |
|
| set_body ($body) |
|
| set_status ($status, $reason=null) |
|
| add_header ($key, $value) |
|
| output () |
|
| send_header ($header, $replace=false, $status=null) |
|
◆ __construct()
__construct |
( |
protected Psr\Http\Message\ResponseInterface |
$psr_response | ) |
|
◆ __call()
◆ add_header()
add_header |
( |
|
$key, |
|
|
|
$value |
|
) |
| |
Adds an additional header to the response.
- Parameters
-
string | the left hand key part |
string | the right hand value part |
- Returns
- static this response object. Useful for cascading method calls.
◆ getPsrResponse()
◆ output()
◆ set_body()
Sets the body of the response.
- Parameters
-
string | Psr\Http\Message\StreamInterface | $body | the body |
- Returns
- static this response object. Useful for cascading method calls.
◆ set_status()
set_status |
( |
|
$status, |
|
|
|
$reason = null |
|
) |
| |
Sets the status code and an optional custom reason. If none is given, the standard reason phrase as of RFC 2616 is used.
- Parameters
-
integer | the status code |
string | the custom reason, defaulting to the one given in RFC 2616 |
- Returns
- static this response object. Useful for cascading method calls.
The documentation for this class was generated from the following file: