Documentation

EncodedValues
in package
implements ValuesInterface

Tags
psalm-type

TPayloadsCollection = Traversable&ArrayAccess&Countable

psalm-type

TKey = array-key

psalm-type

TValue = string

Table of Contents

Interfaces

ValuesInterface

Properties

$payloads  : TPayloadsCollection|null
$values  : array<string|int, mixed>|null
$converter  : DataConverterInterface|null

Methods

count()  : int<0, max>
decodePromise()  : PromiseInterface
Decode promise response upon returning it to the domain layer.
empty()  : static
fromPayloadCollection()  : static
fromPayloads()  : EncodedValues
fromValues()  : static
getValue()  : mixed
Get value by it's index.
getValues()  : array<string|int, mixed>
isEmpty()  : bool
Checks if any value present.
setDataConverter()  : void
sliceValues()  : ValuesInterface
toPayloads()  : Payloads
Returns associated payloads.
__construct()  : mixed
Can not be constructed directly.
isVoidType()  : bool
toProtoCollection()  : array<string|int, mixed>
Returns collection of {@see Payloads}.
valueToPayload()  : Payload

Properties

$payloads

protected TPayloadsCollection|null $payloads = null

$values

protected array<string|int, mixed>|null $values = null

Methods

count()

public count() : int<0, max>
Return values
int<0, max>

decodePromise()

Decode promise response upon returning it to the domain layer.

public static decodePromise(PromiseInterface $promise[, string|ReflectionClass|ReflectionType|Type|null $type = null ]) : PromiseInterface
Parameters
$promise : PromiseInterface
$type : string|ReflectionClass|ReflectionType|Type|null = null
Return values
PromiseInterface

getValue()

Get value by it's index.

public getValue(int|string $index[, mixed $type = null ]) : mixed

Returns null if there are no values and $type has null value like null, Type::TYPE_VOID or Type::TYPE_NULL.

Parameters
$index : int|string
$type : mixed = null

getValues()

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

isEmpty()

Checks if any value present.

public isEmpty() : bool
Return values
bool

toPayloads()

Returns associated payloads.

public toPayloads() : Payloads
Return values
Payloads

__construct()

Can not be constructed directly.

private __construct() : mixed

isVoidType()

private isVoidType([mixed $type = null ]) : bool
Parameters
$type : mixed = null
Return values
bool

toProtoCollection()

Returns collection of {@see Payloads}.

private toProtoCollection() : array<string|int, mixed>
Return values
array<string|int, mixed>

valueToPayload()

private valueToPayload(mixed $value) : Payload
Parameters
$value : mixed
Return values
Payload

        
On this page

Search results