Inttegro PHP SDK

GenericValue extends DomainValue
in package

FinalYes

Immutable value used only where the API contract intentionally permits arbitrary object data.

Unlike closed-schema resource classes, this value preserves original keys and values exactly. Use toArray() when forwarding the object and property access when reading a known key. The SDK does not guess types or rename fields inside open-ended JSON data.

Table of Contents

Methods

__construct()  : mixed
Stores an open-ended API object without transforming its keys.
__get()  : mixed
Reads an arbitrary object key, returning null when it is absent.
__isset()  : bool
Reports whether an arbitrary object key exists with a non-null value.
fromArray()  : static
Creates an open-ended value from decoded API data.
jsonSerialize()  : array<string, mixed>
Returns the same API wire object as `toArray()` for `json_encode()`.
offsetExists()  : bool
Reports whether a non-null property exists for a PHP or API field name.
offsetGet()  : mixed
Reads a typed property through PHP `ArrayAccess`.
offsetSet()  : void
Rejects mutation because domain values are immutable.
offsetUnset()  : void
Rejects unsetting because domain values are immutable.
toArray()  : array<string, mixed>
Returns the unmodified open-ended API object.

Methods

__construct()

Stores an open-ended API object without transforming its keys.

public __construct(array<string, mixed> $data) : mixed
Parameters
$data : array<string, mixed>

Arbitrary JSON-compatible object data.

__get()

Reads an arbitrary object key, returning null when it is absent.

public __get(string $name) : mixed
Parameters
$name : string

Original API object key.

__isset()

Reports whether an arbitrary object key exists with a non-null value.

public __isset(string $name) : bool
Parameters
$name : string

Original API object key.

Return values
bool

fromArray()

Creates an open-ended value from decoded API data.

public static fromArray(array<string, mixed> $data) : static
Parameters
$data : array<string, mixed>

Arbitrary JSON-compatible object data.

Return values
static —

A value that preserves the supplied keys and values.

jsonSerialize()

Returns the same API wire object as `toArray()` for `json_encode()`.

public jsonSerialize() : array<string, mixed>
Return values
array<string, mixed>

offsetExists()

Reports whether a non-null property exists for a PHP or API field name.

public offsetExists(mixed $offset) : bool

Both paymentId and payment_id address the same typed property.

Parameters
$offset : mixed

PHP camelCase or wire snake_case field name.

Return values
bool

offsetGet()

Reads a typed property through PHP `ArrayAccess`.

public offsetGet(mixed $offset) : mixed
Parameters
$offset : mixed

PHP camelCase or wire snake_case field name.

Return values
mixed —

The PHP-native property value.

offsetSet()

Rejects mutation because domain values are immutable.

public offsetSet(mixed $offset, mixed $value) : void
Parameters
$offset : mixed

Ignored field name.

$value : mixed

Ignored replacement value.

Tags
throws
LogicException

Always.

offsetUnset()

Rejects unsetting because domain values are immutable.

public offsetUnset(mixed $offset) : void
Parameters
$offset : mixed

Ignored field name.

Tags
throws
LogicException

Always.

toArray()

Returns the unmodified open-ended API object.

public toArray() : array<string, mixed>
Return values
array<string, mixed>
On this page

Search results