Documentation

ResponseHandlerAbstract
in package

AbstractYes

Table of Contents

Methods

handle()  : ResponseDataContract
Handle the JSON response after an initialization command.
getResponseDataClass()  : ResponseDataContract
Get the response data class instance.
getResponseFields()  : array<string|int, mixed>
Get the required response fields.
check()  : void
Check if all required fields are present in the response.
decode()  : object
Decode the JSON response string into an object.

Methods

getResponseFields()

Get the required response fields.

protected abstract getResponseFields() : array<string|int, mixed>
Return values
array<string|int, mixed>

The required response fields.

decode()

Decode the JSON response string into an object.

private decode(string $json) : object
Parameters
$json : string

The JSON response string.

Tags
throws
ResponseHandlerJsonDecodeException

If JSON decoding fails.

Return values
object

The decoded JSON response as an object.


        
On this page

Search results