DoDomuDojade Documentation

DomainEvent
in package

AbstractYes

Describes a domain event

Table of Contents

Properties

$aggregateId  : string
$aggregateType  : string
$eventId  : string
$occurredAt  : DateTimeImmutable
$version  : int

Methods

__construct()  : mixed
getEventType()  : string
Get event type identifier
toArray()  : array<string|int, mixed>
Returns events contents as an array
getPayload()  : array<string|int, mixed>
Returns payload

Properties

$aggregateId

protected string $aggregateId
Hooks
protected string get

$eventId

protected string $eventId
Hooks
protected string get

Methods

__construct()

public __construct(string $aggregateId, string $aggregateType) : mixed
Parameters
$aggregateId : string
$aggregateType : string
Tags
throws
DateMalformedStringException

getEventType()

Get event type identifier

public abstract getEventType() : string

Used for routing events to specific handlers

Return values
string

toArray()

Returns events contents as an array

public toArray() : array<string|int, mixed>
Return values
array<string|int, mixed>

getPayload()

Returns payload

protected abstract getPayload() : array<string|int, mixed>
Return values
array<string|int, mixed>

        
On this page

Search results