Skip to content

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.

public aggregateId(): \Codefy\Domain\Aggregate\AggregateId

recordedAt

Date the event was recorded on.

public recordedAt(): string|\DateTimeInterface

withPlayhead

Append event version.

public withPlayhead(int $playhead): self

Parameters:

Parameter Type Description
$playhead int

playhead

Version of the recorded event.

public playhead(): int


Automatically generated on 2025-10-13