HTTPException
extends FrameworkException
in package
Things that can go wrong with HTTP
Table of Contents
Methods
- __construct() : mixed
- Tweaks the exception's constructor to assign the file/line to where it is actually raised rather than were it is instantiated.
- forAlreadyMoved() : HTTPException
- For Uploaded file move
- forCopyError() : static
- forCurlError() : HTTPException
- For CurlRequest
- forEmptySupportedNegotiations() : HTTPException
- For Negotiate
- forEnabledZlibOutputCompression() : static
- forFabricatorCreateFailed() : static
- forInvalidDirectory() : static
- forInvalidFile() : HTTPException
- For Uploaded file move
- forInvalidHTTPProtocol() : HTTPException
- For Message
- forInvalidJSON() : static
- Thrown in IncomingRequest when the json_decode() produces an error code other than JSON_ERROR_NONE.
- forInvalidNegotiationType() : HTTPException
- For IncomingRequest
- forInvalidPort() : HTTPException
- For URI
- forInvalidRedirectRoute() : HTTPException
- For RedirectResponse
- forInvalidSameSiteSetting() : HTTPException
- For Invalid SameSite attribute setting
- forInvalidSSLKey() : HTTPException
- For CurlRequest
- forInvalidStatusCode() : HTTPException
- For Response
- forMalformedQueryString() : HTTPException
- For URI
- forMissingCurl() : HTTPException
- For CurlRequest
- forMissingExtension() : static
- forMissingResponseStatus() : HTTPException
- For Response
- forMoveFailed() : HTTPException
- For Uploaded file move
- forNoHandlers() : static
- forSSLCertNotFound() : HTTPException
- For CurlRequest
- forUnableToParseURI() : HTTPException
- For URI
- forUnkownStatusCode() : HTTPException
- For Response
- forUnsupportedJSONFormat() : HTTPException
- Thrown when the JSON format is not supported.
- forURISegmentOutOfRange() : HTTPException
- For URI
Methods
__construct()
Tweaks the exception's constructor to assign the file/line to where it is actually raised rather than were it is instantiated.
public
final __construct([string $message = '' ][, int $code = 0 ][, Throwable|null $previous = null ]) : mixed
Parameters
- $message : string = ''
- $code : int = 0
- $previous : Throwable|null = null
forAlreadyMoved()
For Uploaded file move
public
static forAlreadyMoved() : HTTPException
Return values
HTTPExceptionforCopyError()
public
static forCopyError(string $path) : static
Parameters
- $path : string
Return values
staticforCurlError()
For CurlRequest
public
static forCurlError(string $errorNum, string $error) : HTTPException
Parameters
- $errorNum : string
- $error : string
Tags
Return values
HTTPExceptionforEmptySupportedNegotiations()
For Negotiate
public
static forEmptySupportedNegotiations() : HTTPException
Return values
HTTPExceptionforEnabledZlibOutputCompression()
public
static forEnabledZlibOutputCompression() : static
Return values
staticforFabricatorCreateFailed()
public
static forFabricatorCreateFailed(string $table, string $reason) : static
Parameters
- $table : string
- $reason : string
Return values
staticforInvalidDirectory()
public
static forInvalidDirectory(string $path) : static
Parameters
- $path : string
Return values
staticforInvalidFile()
For Uploaded file move
public
static forInvalidFile([string|null $path = null ]) : HTTPException
Parameters
- $path : string|null = null
Return values
HTTPExceptionforInvalidHTTPProtocol()
For Message
public
static forInvalidHTTPProtocol(string $invalidVersion) : HTTPException
Parameters
- $invalidVersion : string
Return values
HTTPExceptionforInvalidJSON()
Thrown in IncomingRequest when the json_decode() produces an error code other than JSON_ERROR_NONE.
public
static forInvalidJSON([string $error = null ]) : static
Parameters
- $error : string = null
-
The error message
Return values
staticforInvalidNegotiationType()
For IncomingRequest
public
static forInvalidNegotiationType(string $type) : HTTPException
Parameters
- $type : string
Return values
HTTPExceptionforInvalidPort()
For URI
public
static forInvalidPort(int $port) : HTTPException
Parameters
- $port : int
Return values
HTTPExceptionforInvalidRedirectRoute()
For RedirectResponse
public
static forInvalidRedirectRoute(string $route) : HTTPException
Parameters
- $route : string
Return values
HTTPExceptionforInvalidSameSiteSetting()
For Invalid SameSite attribute setting
public
static forInvalidSameSiteSetting(string $samesite) : HTTPException
Use CookieException::forInvalidSameSite()
instead.
Parameters
- $samesite : string
Tags
Return values
HTTPExceptionforInvalidSSLKey()
For CurlRequest
public
static forInvalidSSLKey(string $key) : HTTPException
Parameters
- $key : string
Return values
HTTPExceptionforInvalidStatusCode()
For Response
public
static forInvalidStatusCode(int $code) : HTTPException
Parameters
- $code : int
Return values
HTTPExceptionforMalformedQueryString()
For URI
public
static forMalformedQueryString() : HTTPException
Return values
HTTPExceptionforMissingCurl()
For CurlRequest
public
static forMissingCurl() : HTTPException
Tags
Return values
HTTPExceptionforMissingExtension()
public
static forMissingExtension(string $extension) : static
No longer used.
Parameters
- $extension : string
Return values
staticforMissingResponseStatus()
For Response
public
static forMissingResponseStatus() : HTTPException
Return values
HTTPExceptionforMoveFailed()
For Uploaded file move
public
static forMoveFailed(string $source, string $target, string $error) : HTTPException
Parameters
- $source : string
- $target : string
- $error : string
Return values
HTTPExceptionforNoHandlers()
public
static forNoHandlers(string $class) : static
Parameters
- $class : string
Return values
staticforSSLCertNotFound()
For CurlRequest
public
static forSSLCertNotFound(string $cert) : HTTPException
Parameters
- $cert : string
Return values
HTTPExceptionforUnableToParseURI()
For URI
public
static forUnableToParseURI(string $uri) : HTTPException
Parameters
- $uri : string
Return values
HTTPExceptionforUnkownStatusCode()
For Response
public
static forUnkownStatusCode(int $code) : HTTPException
Parameters
- $code : int
Return values
HTTPExceptionforUnsupportedJSONFormat()
Thrown when the JSON format is not supported.
public
static forUnsupportedJSONFormat() : HTTPException
This is specifically for cases where data validation is expected to work with key-value structures.
Return values
HTTPExceptionforURISegmentOutOfRange()
For URI
public
static forURISegmentOutOfRange(int $segment) : HTTPException
Parameters
- $segment : int