DomainEvent
Something that happened in the past and that is of importance to the business.
- Full name:
\Codefy\Domain\EventSourcing\DomainEvent
Methods
aggregateId
The ID of the Aggregate this event belongs to.
recordedAt
Date the event was recorded on.
withPlayhead
Append event version.
Parameters:
| Parameter | Type | Description |
|---|---|---|
$playhead | int |
playhead
Version of the recorded event.
payload
Returns payload array.
eventType
Name of the event.
eventId
Uuid of the event.
metadata
Event metadata.
metaParam
Retrieve meta data from metadata by name.
Parameters:
| Parameter | Type | Description |
|---|---|---|
$name | string | |
$default | mixed |