abstract | |
|---|---|
extends |
AbstractServiceDeclaration |
The declaration of a service: a facade the owning domain offers other domains — several methods, any purpose:
reading, aggregating, recording, writing. List it in your module's ARTIFACTS and name its final handler in
HANDLER; another domain takes it from the registry.
#[Call] is optional: without it the service is called freely, with it the mediator checks the caller first. A
service that writes carries #[Call]. Writing, it follows the rules of an operation: it runs in the caller's unit
of work, opens no transaction and seals nothing.
// {Domain}/Services/Configuration.php
final class Configuration extends AbstractService
{
public const string NAMESPACE = 'com.example.configuration.services.configuration';
public const string TITLE = 'Configuration';
public const string DESCRIPTION = 'Reads the characteristics in force on a date.';
public const string INTERFACE = ConfigurationInterface::class;
public const string HANDLER = ConfigurationHandler::class;
}