Provider
in package
FinalYes
Compiles and registers one {@see DXNSchemaProvider} into a {@see Registry}, in order:
- Decodes and compiles the provider's own
dxnSchema()source into the registry. Every named type and every%schema}entry that document defines gets folded in, not only the onedxnSchemaName()points at. - Looks up
dxnSchemaName()in the now-compiled registry -- if it isn't there (the provider declared a name its own document doesn't define), throws a specific error naming both, rather than silently registering nothing. - Associates
dxnClass()with that schema name (Registry::putStructModule()) -- what letsencode()/encodeBinary()serialize instances of it directly and lets{form: 'reference', name}checks recognize it. - If the provider implements DXNSchemaMaterializingProvider,
registers its
dxnMaterialize()(Registry::putStructMaterializer()). If not, decoding this schema falls back to the default plain field map.
Table of Contents
Methods
- registerProvider() : Registry
- __construct() : mixed
Methods
registerProvider()
public
static registerProvider(Registry $registry, DXNSchemaProvider $provider, callable(mixed, Registry): Registry $compile) : Registry
Parameters
- $registry : Registry
- $provider : DXNSchemaProvider
- $compile : callable(mixed, Registry): Registry
Return values
Registry__construct()
private
__construct() : mixed