ProophEventSourcing domain events are of the type AggregateChanged
Author: Alexander Miertsch (kontakt@codeliner.ws)
Inheritance: extends Prooph\EventSourcing\AggregateChanged
Beispiel #1
0
 /**
  * Each applied event needs a corresponding handler method.
  *
  * The naming convention is: when[:ShortEventName]
  *
  * @param UserWasCreated $event
  */
 protected function whenUserWasCreated(UserWasCreated $event)
 {
     //Simply assign the event payload to the appropriate properties
     $this->uuid = Uuid::fromString($event->aggregateId());
     $this->name = $event->username();
 }