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