EncodedCollection
in package
implements
IteratorAggregate, Countable
Assoc collection of typed values.
Tags
Table of Contents
Interfaces
- IteratorAggregate
- Countable
Properties
- $converter : DataConverterInterface|null
- $payloads : TPayloadsCollection|null
- $values : array<string|int, mixed>
Methods
- __clone() : mixed
- count() : int
- empty() : static
- fromPayloadCollection() : static
- fromValues() : static
- getIterator() : Traversable
- getValue() : mixed
- getValues() : array<string|int, mixed>
- isEmpty() : bool
- setDataConverter() : void
- toPayloadArray() : array<string|int, Payload>
- withValue() : static
- __construct() : mixed
- Cannot be constructed directly.
Properties
$converter
private
DataConverterInterface|null
$converter
= null
$payloads
private
TPayloadsCollection|null
$payloads
= null
$values
private
array<string|int, mixed>
$values
= []
Methods
__clone()
public
__clone() : mixed
count()
public
count() : int
Return values
intempty()
public
static empty() : static
Return values
staticfromPayloadCollection()
public
static fromPayloadCollection(array<string|int, mixed>|ArrayAccess $payloads, DataConverterInterface $dataConverter) : static
Parameters
- $payloads : array<string|int, mixed>|ArrayAccess
- $dataConverter : DataConverterInterface
Return values
staticfromValues()
public
static fromValues(iterable<TKey, TValue> $values[, DataConverterInterface|null $dataConverter = null ]) : static
Parameters
- $values : iterable<TKey, TValue>
- $dataConverter : DataConverterInterface|null = null
Return values
staticgetIterator()
public
getIterator() : Traversable
Return values
TraversablegetValue()
public
getValue(string|int $name[, Type|string|null $type = null ]) : mixed
Parameters
- $name : string|int
- $type : Type|string|null = null
getValues()
public
getValues() : array<string|int, mixed>
Return values
array<string|int, mixed>isEmpty()
public
isEmpty() : bool
Return values
boolsetDataConverter()
public
setDataConverter(DataConverterInterface $converter) : void
Parameters
- $converter : DataConverterInterface
toPayloadArray()
public
toPayloadArray() : array<string|int, Payload>
Return values
array<string|int, Payload>withValue()
public
withValue(TKey $name, TValue $value) : static
Parameters
- $name : TKey
- $value : TValue
Return values
static__construct()
Cannot be constructed directly.
private
final __construct() : mixed