AbstractReturns all command definitions for this context. Override to provide commands for this context.
Array of command definitions (empty by default)
Returns all query definitions for this context. Override to provide queries for this context.
Array of query definitions (empty by default)
Returns all event handler definitions for this context. Override to provide event handlers for this context.
Array of event handler definitions (empty by default)
Returns all repository definitions for this context. Override to provide repositories for this context.
Array of repository definitions (empty by default)
Initializes the context.
This method:
Subclasses can override this method but should call super.initialize() to ensure automatic registration happens.
The context configuration
Health check for the context. Default implementation returns healthy. Override to provide custom health checks.
Health check result
Abstract ReadonlymetadataContext metadata (name, dependencies). Must be implemented by subclasses.
Abstract ReadonlynameThe name of the context. Must be implemented by subclasses.
Protected OptionalconfigReference to the context configuration, available after initialize.
Base implementation for contexts.
Provides automatic registration of commands, queries, event handlers, and repositories during the initialize phase.
Subclasses only need to:
The base class handles all the wiring automatically.
Note: Context is different from Plugin:
Example