ValueDatumWriter
in package
FinalYes
Selects fixed Value branches without collapsing PHP map keys.
The private binding schema represents a map as an array of key/value records, which has the same Avro binary layout as a map while keeping numeric-looking keys in string values. Apache's datum writer performs validation and binary encoding.
Table of Contents
Constants
- BINDING_SCHEMA_JSON : mixed = '{"type":"record","name":"Value","namespace":"d...
Properties
- $bindingSchema : AvroSchema|null
Methods
- write() : void
- bindingSchema() : AvroSchema
- toBindingDatum() : array{value: mixed}
Constants
BINDING_SCHEMA_JSON
private
mixed
BINDING_SCHEMA_JSON
= '{"type":"record","name":"Value","namespace":"durable_workflow.protocol","fields":[{"name":"value","type":["null",{"type":"record","name":"BooleanValue","fields":[{"name":"boolean","type":"boolean"}]},{"type":"record","name":"LongValue","fields":[{"name":"long","type":"long"}]},{"type":"record","name":"DoubleValue","fields":[{"name":"double","type":"double"}]},{"type":"record","name":"BytesValue","fields":[{"name":"bytes","type":"bytes"}]},{"type":"record","name":"StringValue","fields":[{"name":"string","type":"string"}]},{"type":"record","name":"ArrayValue","fields":[{"name":"items","type":{"type":"array","items":"Value"}}]},{"type":"record","name":"MapValue","fields":[{"name":"entries","type":{"type":"array","items":{"type":"record","name":"MapEntry","fields":[{"name":"key","type":"string"},{"name":"value","type":"Value"}]}}}]}]}]}'
Properties
$bindingSchema
private
static AvroSchema|null
$bindingSchema
= null
Methods
write()
public
write(array{value: mixed} $datum, AvroIOBinaryEncoder $encoder) : void
Parameters
- $datum : array{value: mixed}
- $encoder : AvroIOBinaryEncoder
bindingSchema()
private
static bindingSchema() : AvroSchema
Return values
AvroSchematoBindingDatum()
private
toBindingDatum(array{value: mixed} $datum) : array{value: mixed}
Parameters
- $datum : array{value: mixed}