Skip to content

EventProducerAware


  • Full name: \Codefy\Traits\EventProducerAware

Properties

playhead

protected int $playhead

recordedEvents

protected array $recordedEvents

Methods

recordThat

Records domain events.

protected recordThat(\Codefy\Domain\EventSourcing\DomainEvent $event): void

Parameters:

Parameter Type Description
$event \Codefy\Domain\EventSourcing\DomainEvent

pullDomainEvents

public pullDomainEvents(): array

when

protected when(\Codefy\Domain\EventSourcing\DomainEvent $event): void
  • This method is abstract. Parameters:
Parameter Type Description
$event \Codefy\Domain\EventSourcing\DomainEvent