Documentation

HttpException extends RuntimeException
in package
implements HttpExceptionInterface

HttpException.

Tags
author

Kris Wallsmith kris@symfony.com

Table of Contents

Interfaces

HttpExceptionInterface
Interface for HTTP error exceptions.

Properties

$headers  : array<string|int, mixed>
$statusCode  : int

Methods

__construct()  : mixed
getHeaders()  : array<string|int, mixed>
Returns response headers.
getStatusCode()  : int
Returns the status code.
setHeaders()  : mixed

Properties

Methods

__construct()

public __construct(int $statusCode[, string $message = '' ][, Throwable $previous = null ][, array<string|int, mixed> $headers = [] ][, int $code = 0 ]) : mixed
Parameters
$statusCode : int
$message : string = ''
$previous : Throwable = null
$headers : array<string|int, mixed> = []
$code : int = 0

getHeaders()

Returns response headers.

public getHeaders() : array<string|int, mixed>
Return values
array<string|int, mixed>

getStatusCode()

Returns the status code.

public getStatusCode() : int
Return values
int

setHeaders()

public setHeaders(array<string|int, mixed> $headers) : mixed
Parameters
$headers : array<string|int, mixed>

        
On this page

Search results