Durable Workflow PHP SDK

AvroPayloadCodec
in package
implements PayloadCodec

FinalYes

Apache Avro implementation of the Durable Workflow payload framing.

Table of Contents

Interfaces

PayloadCodec

Constants

GENERIC_PREFIX  : mixed = "\x00"
TYPED_PREFIX  : mixed = "\x01"
WRAPPER_SCHEMA_JSON  : mixed = '{"type":"record","name":"Payload","namespace":...

Properties

$schema  : AvroSchema|null
$wrapperSchema  : AvroSchema|null

Methods

__construct()  : mixed
decode()  : mixed
decodeEnvelope()  : mixed
encode()  : string
envelope()  : array{codec: string, blob: string}
name()  : string
parseSchema()  : AvroSchema
withSchema()  : self
readTypedFrame()  : AvroSchema, 1: string}
schemaJson()  : string
withoutApacheDeprecations()  : T
wrapperSchema()  : AvroSchema

Constants

WRAPPER_SCHEMA_JSON

public mixed WRAPPER_SCHEMA_JSON = '{"type":"record","name":"Payload","namespace":"durable_workflow","fields":[{"name":"json","type":"string"},{"name":"version","type":"int","default":1}]}'

Properties

Methods

__construct()

public __construct([AvroSchema|null $schema = null ]) : mixed
Parameters
$schema : AvroSchema|null = null

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

withSchema()

public withSchema(AvroSchema|string $schema) : self
Parameters
$schema : AvroSchema|string
Return values
self

readTypedFrame()

private static readTypedFrame(string $bytes) : AvroSchema, 1: string}
Parameters
$bytes : string
Return values
AvroSchema, 1: string}

schemaJson()

private static schemaJson(AvroSchema $schema) : string
Parameters
$schema : AvroSchema
Return values
string

withoutApacheDeprecations()

private static withoutApacheDeprecations(callable(): T $operation) : T
Parameters
$operation : callable(): T
Tags
template
Return values
T

wrapperSchema()

private static wrapperSchema() : AvroSchema
Return values
AvroSchema
On this page

Search results