Esempio n. 1
0
 /**
  * @param TodoWasPosted $event
  */
 protected function whenTodoWasPosted(TodoWasPosted $event)
 {
     $this->todoId = $event->todoId();
     $this->assigneeId = $event->assigneeId();
     $this->text = $event->text();
     $this->status = $event->todoStatus();
 }
Esempio n. 2
0
 /**
  * @param TodoWasPosted $event
  */
 public function onTodoWasPosted(TodoWasPosted $event)
 {
     $this->connection->insert(Table::TODO, ['id' => $event->todoId()->toString(), 'assignee_id' => $event->assigneeId()->toString(), 'text' => $event->text(), 'status' => $event->todoStatus()->toString()]);
 }