Пример #1
0
 /**
  * @param GameLostEvent $event
  */
 public function applyGameLost(GameLostEvent $event)
 {
     $readModel = new GameEnd();
     $readModel->setGameId($event->getGameId());
     $readModel->setStatus(0);
     $this->repository->save($readModel);
 }
Пример #2
0
 public function applyGameLost(GameLost $event)
 {
     $readModel = $this->repository->find($event->getGameId());
     $readModel->setStatus("Game lost!");
     $readModel->setGameEndTime($event->getExpandedTimeOnGame());
     $this->repository->save($readModel);
 }