MediaWiki master
MediaWiki\DomainEvent\DomainEventDispatcher Interface Reference

Service for sending domain events to registered listeners. More...

Inherited by MediaWiki\DomainEvent\EventDispatchEngine.

Public Member Functions

 dispatch (DomainEvent $event, IConnectionProvider $dbProvider)
 Dispatch the given event to any listeners that have been registered for the given event type.
 

Detailed Description

Service for sending domain events to registered listeners.

Since
1.44
Stability: unstable
until 1.45

Definition at line 12 of file DomainEventDispatcher.php.

Member Function Documentation

◆ dispatch()

MediaWiki\DomainEvent\DomainEventDispatcher::dispatch ( DomainEvent $event,
IConnectionProvider $dbProvider )

Dispatch the given event to any listeners that have been registered for the given event type.

The event will be dispatched to listeners later, in a deferred update, after (and if) the current transaction in $dbw has been committed successfully.

Implementations should aim to provide at-least-once delivery semantics, but guaranteed delivery is not a hard requirement of this interface. An application may guarantee delivery of domain events by providing an appropriate implementation (a transactional outbox).

Implemented in MediaWiki\DomainEvent\EventDispatchEngine.


The documentation for this interface was generated from the following file: