Heratio Framework API Reference

Providers
in package

Service provider registry for plugin capabilities.

Plugins register their implementations of framework contracts here. This enables loose coupling - the framework can use plugin features without hardcoded require_once statements.

Usage in plugins: AtomFramework\Providers::register('pii_redaction', new MyRedactionService());

Usage in framework: $provider = AtomFramework\Providers::get('pii_redaction'); if ($provider && $provider->hasRedaction($id)) { ... }

Table of Contents

Methods

clear()  : void
Clear all registered providers (for testing).
defineInterface()  : void
Register a custom interface mapping.
get()  : object|null
Get a registered provider.
has()  : bool
Check if a provider is registered.
iiif()  : IiifProviderInterface|null
Get IIIF provider.
model3d()  : Model3DProviderInterface|null
Get 3D model provider.
piiRedaction()  : PiiRedactionProviderInterface|null
Get PII redaction provider.
register()  : void
Register a service provider.
registered()  : array<string|int, string>
Get all registered provider names.

Methods

clear()

Clear all registered providers (for testing).

public static clear() : void

defineInterface()

Register a custom interface mapping.

public static defineInterface(string $name, string $interface) : void

Allows plugins to define their own provider types.

Parameters
$name : string

Provider name

$interface : string

Fully qualified interface name

get()

Get a registered provider.

public static get(string $name) : object|null
Parameters
$name : string

Provider name

Return values
object|null

The provider or null if not registered

has()

Check if a provider is registered.

public static has(string $name) : bool
Parameters
$name : string

Provider name

Return values
bool

register()

Register a service provider.

public static register(string $name, object $implementation) : void
Parameters
$name : string

Provider name (e.g., 'pii_redaction', 'model_3d')

$implementation : object

Provider implementation

Tags
throws
InvalidArgumentException

If implementation doesn't match expected interface

registered()

Get all registered provider names.

public static registered() : array<string|int, string>
Return values
array<string|int, string>

        
On this page

Search results