HttpException
extends RuntimeException
in package
implements
HttpExceptionInterface
HttpException.
Tags
Interfaces, Classes, Traits and Enums
- HttpExceptionInterface
- Interface for HTTP error exceptions.
Table of Contents
- $headers : mixed
- $statusCode : mixed
- __construct() : mixed
- getHeaders() : array<string|int, mixed>
- Returns response headers.
- getStatusCode() : int
- Returns the status code.
- setHeaders() : mixed
- Set response headers.
Properties
$headers
private
mixed
$headers
$statusCode
private
mixed
$statusCode
Methods
__construct()
public
__construct(int $statusCode[, string $message = null ][, Throwable $previous = null ][, array<string|int, mixed> $headers = [] ], int|null $code) : mixed
Parameters
- $statusCode : int
- $message : string = null
- $previous : Throwable = null
- $headers : array<string|int, mixed> = []
- $code : int|null
Return values
mixed —getHeaders()
Returns response headers.
public
getHeaders() : array<string|int, mixed>
Return values
array<string|int, mixed> —Response headers
getStatusCode()
Returns the status code.
public
getStatusCode() : int
Return values
int —An HTTP response status code
setHeaders()
Set response headers.
public
setHeaders(array<string|int, mixed> $headers) : mixed
Parameters
- $headers : array<string|int, mixed>
-
Response headers