DXNSchemaMaterializingProvider
extends
DXNSchemaProvider
in
A {@see DXNSchemaProvider} that additionally supplies the schema's materializer -- called for every decoded struct of the schema, whatever its version, with the schema's name, the version the fields were read with and the checked fields; it answers the provider's own class at the latest version. Without this, a provider's schema decodes to the generic {@see \JOetjen\Dextrin\Value\DXNStruct}.
Table of Contents
Methods
- dxnClass() : class-string
- The PHP class {@see self::dxnSchemaName()}'s schema is associated with, for `{form: 'reference', name}` checks during encode-time validation.
- dxnMaterialize() : mixed
- dxnSchema() : string
- This provider's own `.dxns` source -- every named type and every `%schema{}` entry it defines gets compiled in, not only {@see self::dxnSchemaName()}'s own entry.
- dxnSchemaName() : string
- Which `%schema{}` entry in {@see self::dxnSchema()}'s own document this provider is for.
Methods
dxnClass()
The PHP class {@see self::dxnSchemaName()}'s schema is associated with, for `{form: 'reference', name}` checks during encode-time validation.
public
dxnClass() : class-string
Return values
class-stringdxnMaterialize()
public
dxnMaterialize(string $name, int $version, array<int|string, mixed> $fields) : mixed
Parameters
- $name : string
- $version : int
- $fields : array<int|string, mixed>
dxnSchema()
This provider's own `.dxns` source -- every named type and every `%schema{}` entry it defines gets compiled in, not only {@see self::dxnSchemaName()}'s own entry.
public
dxnSchema() : string
Return values
stringdxnSchemaName()
Which `%schema{}` entry in {@see self::dxnSchema()}'s own document this provider is for.
public
dxnSchemaName() : string