Stellar PHP SDK API Documentation

SorobanRpcErrorResponse

Holds error response info if no successful result is provided.

Table of Contents

Properties

$code  : int|null
$data  : array<string|int, mixed>|null
$jsonResponse  : array<string|int, mixed>
$message  : string|null

Methods

__construct()  : mixed
fromJson()  : static
Creates an instance from JSON-RPC response data
getCode()  : int|null
getData()  : array<string|int, mixed>|null
getJsonResponse()  : array<string|int, mixed>
getMessage()  : string|null
setCode()  : void
setData()  : void
setJsonResponse()  : void
setMessage()  : void

Properties

Methods

__construct()

public __construct(array<string|int, mixed> $jsonResponse) : mixed
Parameters
$jsonResponse : array<string|int, mixed>

Complete JSON response received

fromJson()

Creates an instance from JSON-RPC response data

public static fromJson(array<string, mixed> $json) : static
Parameters
$json : array<string, mixed>

The JSON response data

Return values
static

The created instance

getCode()

public getCode() : int|null
Return values
int|null

Short unique int representing the type of error

getData()

public getData() : array<string|int, mixed>|null
Return values
array<string|int, mixed>|null

More data related to the error if available

getJsonResponse()

public getJsonResponse() : array<string|int, mixed>
Return values
array<string|int, mixed>

Complete JSON response received

getMessage()

public getMessage() : string|null
Return values
string|null

Human friendly summary of the error

setCode()

public setCode(int|null $code) : void
Parameters
$code : int|null

Short unique int representing the type of error

setData()

public setData(array<string|int, mixed>|null $data) : void
Parameters
$data : array<string|int, mixed>|null

More data related to the error if available

setJsonResponse()

public setJsonResponse(array<string|int, mixed> $jsonResponse) : void
Parameters
$jsonResponse : array<string|int, mixed>

Complete JSON response received

setMessage()

public setMessage(string|null $message) : void
Parameters
$message : string|null

Human friendly summary of the error


        
On this page

Search results