Exception
extends Exception
in package
Class for rest exceptions
Table of Contents
- $httpBody : string
- HTTP response body
- $httpCode : int
- HTTP response code
- $options : array<string|int, mixed>
- HTTP request options
- $url : string
- HTTP response URL
- __construct() : mixed
- Constructor
- getHttpBody() : string
- Method returns HTTP body
- getHttpCode() : int
- Method returns HTTP code
- getOptions() : array<string|int, mixed>
- Method returns request options
- getUrl() : string
- Method returns URL
Properties
$httpBody
HTTP response body
protected
string
$httpBody
= ''
$httpCode
HTTP response code
protected
int
$httpCode
= 0
$options
HTTP request options
protected
array<string|int, mixed>
$options
= []
$url
HTTP response URL
protected
string
$url
= ''
Methods
__construct()
Constructor
public
__construct(string $message, int $code, int $httpCode, string $httpBody[, string $url = '' ][, array<string|int, mixed> $options = [] ]) : mixed
Parameters
- $message : string
-
Error description
- $code : int
-
Code of the error
- $httpCode : int
-
Response HTTP code
- $httpBody : string
-
Body of the response
- $url : string = ''
-
Request URL
- $options : array<string|int, mixed> = []
-
Request options
Return values
mixed —getHttpBody()
Method returns HTTP body
public
getHttpBody() : string
Return values
string —HTTP body
getHttpCode()
Method returns HTTP code
public
getHttpCode() : int
Return values
int —HTTP code
getOptions()
Method returns request options
public
getOptions() : array<string|int, mixed>
Return values
array<string|int, mixed> —Request options
getUrl()
Method returns URL
public
getUrl() : string
Return values
string —URL