Beispiel #1
0
 /**
  * @param TodoWasMarkedAsDone $event
  */
 protected function whenTodoWasMarkedAsDone(TodoWasMarkedAsDone $event)
 {
     $this->status = $event->newStatus();
 }
 /**
  * @param TodoWasMarkedAsDone $event
  */
 public function onTodoWasMarkedAsDone(TodoWasMarkedAsDone $event)
 {
     $this->connection->update(Table::TODO, ['status' => $event->newStatus()->toString()], ['id' => $event->todoId()->toString()]);
 }