예제 #1
0
 public function load($manager)
 {
     $mates = $this->gameRepository->createRecentMateQuery()->getQuery()->execute();
     foreach ($mates as $mate) {
         $trial = new Trial();
         $trial->setGame($mate);
         $trial->setUser($mate->getWinner()->getUser());
         $trial->setScore(70);
         $manager->persist($trial);
     }
     $manager->flush();
 }
예제 #2
0
 public function setVerdict(Trial $trial, $verdict)
 {
     $trial->setVerdict($verdict);
 }