mini\Http\Message\HtmlResponse::withStatus()
Method
public
Signature
public function withStatus(int $code, string $reasonPhrase = ''): Psr\Http\Message\ResponseInterface
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$code |
int |
required | Documentation missing |
$reasonPhrase |
string |
''
|
Documentation missing |
Returns
Psr\Http\Message\ResponseInterface
Documentation
Return an instance with the specified status code and, optionally, reason phrase.
If no reason phrase is specified, implementations MAY choose to default to the RFC 7231 or IANA recommended reason phrase for the response's status code.
This method MUST be implemented in such a way as to retain the immutability of the message, and MUST return an instance that has the updated status and reason phrase.
Inherited From
mini\Http\Message\Response