final |
|---|
readonly |
Stands between another domain and a released service: it checks the declaration's #[Call] — mandatory on an
operation, optional on a service — against the actor of SdkContext, and lets the call through or refuses it.
The counterpart of the action dispatcher: the declaration says it, the mediator enforces it, the handler knows
nothing of it.
The registries hand out a released service through it ({@see ServiceRegistryInterface::getService()}):
{@see wrap()} builds an object implementing the interface, every method of which asks {@see authorize()} before it
calls the declaration's handler. A service without #[Call] is free; the mediator lets it pass.
A refusal is a security event. It is thrown into the caller, whose unit of work rolls back — so the row is written once the transaction is over, by commit or by rollback, never inside it, where the rollback would take it along.
| Methods | ||
|---|---|---|
public
|
__construct(AbilityResolverInterface $abilities, ServiceProxyFactory $proxies, Dispatcher $events, Container $container)
|
# |
public
|
wrap(AbstractServiceDeclaration $declaration, object $target): object
|
# |
public
|
authorize(AbstractServiceDeclaration $declaration): void
|
# |