EncodedValues
in package
implements
ValuesInterface
List of typed values.
Tags
Table of Contents
Interfaces
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
$converter
private
DataConverterInterface|null
$converter
= 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
PromiseInterfaceempty()
public
static empty() : static
Return values
staticfromPayloadCollection()
public
static fromPayloadCollection(TPayloadsCollection $payloads[, DataConverterInterface|null $dataConverter = null ]) : static
Parameters
- $payloads : TPayloadsCollection
- $dataConverter : DataConverterInterface|null = null
Return values
staticfromPayloads()
public
static fromPayloads(Payloads $payloads, DataConverterInterface $dataConverter) : EncodedValues
Parameters
- $payloads : Payloads
- $dataConverter : DataConverterInterface
Return values
EncodedValuesfromValues()
public
static fromValues(array<string|int, mixed> $values[, DataConverterInterface|null $dataConverter = null ]) : static
Parameters
- $values : array<string|int, mixed>
- $dataConverter : DataConverterInterface|null = null
Return values
staticgetValue()
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
boolsetDataConverter()
public
setDataConverter(DataConverterInterface $converter) : void
Parameters
- $converter : DataConverterInterface
sliceValues()
public
static sliceValues(DataConverterInterface $converter, ValuesInterface $values, int $offset[, int|null $length = null ]) : ValuesInterface
Parameters
- $converter : DataConverterInterface
- $values : ValuesInterface
- $offset : int
- $length : int|null = null
Return values
ValuesInterfacetoPayloads()
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
booltoProtoCollection()
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