Symfony\Component\HttpFoundation\Response::setStatusCode
Sets the response status code.
Signature
public function setStatusCode(integer
$code,
[mixed
$text = null] )
Parameters
$code
— integer- HTTP status code
$text
— mixed- HTTP status text
If the status text is null it will be automatically populated for the known
status codes and left empty otherwise.
Returns
- Response
Errors/Exceptions
-
InvalidArgumentException
- When the HTTP status code is not valid