ApiException
extends Exception
in package
ApiException Class Doc Comment
Tags
Table of Contents
Properties
- $responseBody : stdClass|string|null
- The HTTP body of the server response either as Json or string.
- $responseHeaders : array<string|int, array<string|int, string>>|null
- The HTTP header of the server response.
- $responseObject : stdClass|string|null
- The deserialized response object
Methods
- __construct() : mixed
- Constructor
- getResponseBody() : stdClass|string|null
- Gets the HTTP body of the server response either as Json or string
- getResponseHeaders() : array<string|int, array<string|int, string>>|null
- Gets the HTTP response header
- getResponseObject() : mixed
- Gets the deserialized response object (during deserialization)
- setResponseObject() : void
- Sets the deserialized response object (during deserialization)
Properties
$responseBody
The HTTP body of the server response either as Json or string.
protected
stdClass|string|null
$responseBody
$responseHeaders
The HTTP header of the server response.
protected
array<string|int, array<string|int, string>>|null
$responseHeaders
$responseObject
The deserialized response object
protected
stdClass|string|null
$responseObject
Methods
__construct()
Constructor
public
__construct([string $message = "" ][, int $code = 0 ][, array<string|int, array<string|int, string>>|null $responseHeaders = [] ][, stdClass|string|null $responseBody = null ]) : mixed
Parameters
- $message : string = ""
-
Error message
- $code : int = 0
-
HTTP status code
- $responseHeaders : array<string|int, array<string|int, string>>|null = []
-
HTTP response header
- $responseBody : stdClass|string|null = null
-
HTTP decoded body of the server response either as \stdClass or string
getResponseBody()
Gets the HTTP body of the server response either as Json or string
public
getResponseBody() : stdClass|string|null
Return values
stdClass|string|null —HTTP body of the server response either as \stdClass or string
getResponseHeaders()
Gets the HTTP response header
public
getResponseHeaders() : array<string|int, array<string|int, string>>|null
Return values
array<string|int, array<string|int, string>>|null —HTTP response header
getResponseObject()
Gets the deserialized response object (during deserialization)
public
getResponseObject() : mixed
Return values
mixed —the deserialized response object
setResponseObject()
Sets the deserialized response object (during deserialization)
public
setResponseObject(mixed $obj) : void
Parameters
- $obj : mixed
-
Deserialized response object