HttpException
class HttpException extends RuntimeException implements HttpExceptionInterface
HttpException.
Methods
| __construct(int $statusCode, string $message = null, Exception $previous = null, array $headers = array(), int|null $code = 0) | ||
| int | getStatusCode() Returns the status code. | |
| array | getHeaders() Returns response headers. | |
| setHeaders(array $headers) Set response headers. |
Details
__construct(int $statusCode, string $message = null, Exception $previous = null, array $headers = array(), int|null $code = 0)
Parameters
| int | $statusCode | |
| string | $message | |
| Exception | $previous | |
| array | $headers | |
| int|null | $code |
int getStatusCode()
Returns the status code.
Return Value
| int | An HTTP response status code |
array getHeaders()
Returns response headers.
Return Value
| array | Response headers |
setHeaders(array $headers)
Set response headers.
Parameters
| array | $headers | Response headers |
© 2004–2017 Fabien Potencier
Licensed under the MIT License.
https://api.symfony.com/4.1/Symfony/Component/HttpKernel/Exception/HttpException.html