AXIAM PHP SDK

SetErr
in package

FinalYes

One RFC 8936 `setErrs` entry: the RFC 8935 §2.4 `err` code and an optional description.

AXIAM records the code and never stores the description (§32.6).

Table of Contents

Properties

$description  : string|null
$err  : string

Methods

__construct()  : mixed
fromReason()  : self
The entry for a refusal: its {@see SetFailureReason::pushErrorCode()}.
toArray()  : array{err: string, description?: string}
The wire form, `{"err": …}` plus `description` when set.

Properties

$description read-only

public string|null $description = null

$err read-only

public string $err

Methods

__construct()

public __construct(string $err[, string|null $description = null ]) : mixed
Parameters
$err : string

An RFC 8935 §2.4 code (invalid_request, invalid_key, …).

$description : string|null = null

Optional text for a person; never stored by AXIAM.

fromReason()

The entry for a refusal: its {@see SetFailureReason::pushErrorCode()}.

public static fromReason(SetFailureReason $reason) : self
Parameters
$reason : SetFailureReason
Return values
self

toArray()

The wire form, `{"err": …}` plus `description` when set.

public toArray() : array{err: string, description?: string}
Return values
array{err: string, description?: string}
On this page

Search results