Durable Workflow PHP SDK — API Reference

Guides

AvroPayloadCodec
in package
implements PayloadCodec

FinalYes

Fixed durable_workflow.protocol.Value codec using Avro single-object encoding.

Table of Contents

Interfaces

PayloadCodec

Constants

SINGLE_OBJECT_MAGIC  : mixed = "\xc3\x01"
VALUE_SCHEMA_FINGERPRINT  : mixed = "\xe2\xa3=\xffU\x80\"7"
VALUE_SCHEMA_FINGERPRINT_HEX  : mixed = 'e2a33dff55802237'
VALUE_SCHEMA_JSON  : mixed = '{"type":"record","name":"Value","namespace":"d...

Properties

$valueSchema  : AvroSchema|null

Methods

decode()  : mixed
decodeEnvelope()  : mixed
encode()  : string
envelope()  : array{codec: string, blob: string}
name()  : string
parseSchema()  : AvroSchema
fromDatum()  : mixed
looksLikeJsonDocument()  : bool
toDatum()  : array{value: mixed}
valueSchema()  : AvroSchema
withoutApacheDeprecations()  : mixed
Apache Avro 1.12 emits PHP deprecations for legacy numeric casts. Schema resolution warnings are intentionally not suppressed.

Constants

VALUE_SCHEMA_FINGERPRINT

public mixed VALUE_SCHEMA_FINGERPRINT = "\xe2\xa3=\xffU\x80\"7"

VALUE_SCHEMA_FINGERPRINT_HEX

public mixed VALUE_SCHEMA_FINGERPRINT_HEX = 'e2a33dff55802237'

VALUE_SCHEMA_JSON

public mixed VALUE_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":"map","values":"Value"}}]}]}]}'

Properties

Methods

decodeEnvelope()

public decodeEnvelope(array{codec?: mixed, blob?: mixed}|string|null $envelope) : mixed
Parameters
$envelope : array{codec?: mixed, blob?: mixed}|string|null

encode()

public encode(mixed $value) : string
Parameters
$value : mixed
Return values
string

envelope()

public envelope(mixed $value) : array{codec: string, blob: string}
Parameters
$value : mixed
Return values
array{codec: string, blob: string}

parseSchema()

public static parseSchema(string $schemaJson) : AvroSchema
Parameters
$schemaJson : string
Return values
AvroSchema

fromDatum()

private static fromDatum(mixed $datum) : mixed
Parameters
$datum : mixed

looksLikeJsonDocument()

private static looksLikeJsonDocument(string $bytes) : bool
Parameters
$bytes : string
Return values
bool

toDatum()

private static toDatum(mixed $value) : array{value: mixed}
Parameters
$value : mixed
Return values
array{value: mixed}

valueSchema()

private static valueSchema() : AvroSchema
Return values
AvroSchema

withoutApacheDeprecations()

Apache Avro 1.12 emits PHP deprecations for legacy numeric casts. Schema resolution warnings are intentionally not suppressed.

private static withoutApacheDeprecations(callable $operation) : mixed
Parameters
$operation : callable
On this page

Search results