MediaWiki master
|
Base class for domain event objects to be used with DomainEventDispatcher. More...
Inherited by MediaWiki\Storage\PageUpdatedEvent.
Public Member Functions | |
__construct (string $type, $timestamp=false) | |
getEventTimestamp () | |
getEventType () | |
Base class for domain event objects to be used with DomainEventDispatcher.
Domain events are used to notify other parts of the code (oder "domains") about a change to the persistent state of the local wiki.
The idea of domain events is borrowed from the Domain Driven Design paradigm. For a thorough explanation, see https://learn.microsoft.com/en-us/dotnet/architecture/microservices/microservice-ddd-cqrs-patterns/domain-events-design-implementation. Also compare https://martinfowler.com/eaaDev/DomainEvent.html.
Domain event objects must be immutable.
An event object should contain all information that was used to affect that change (the command parameters) as well as information representing the outcome of the change.
Definition at line 28 of file DomainEvent.php.
MediaWiki\DomainEvent\DomainEvent::__construct | ( | string | $type, |
$timestamp = false ) |
string | $type | |
string | ConvertibleTimestamp | false | $timestamp |
Definition at line 38 of file DomainEvent.php.
MediaWiki\DomainEvent\DomainEvent::getEventTimestamp | ( | ) |
Definition at line 56 of file DomainEvent.php.
MediaWiki\DomainEvent\DomainEvent::getEventType | ( | ) |
Definition at line 49 of file DomainEvent.php.