Esempio n. 1
0
 public function startNextRound()
 {
     $currentRound = $this->roundRepo->findCurrent();
     // check if settings for next round exist
     if (!($nextRound = $this->roundRepo->find($currentRound->getId() + 1))) {
         $nextRound = clone $currentRound;
         // __clone removes id
         $this->em->persist($nextRound);
     }
     $currentRound->setFinished(true);
     $nextRound->setStarted(true);
     $this->em->flush();
 }
Esempio n. 2
0
 public function __construct(CoinManagerContainer $coinManagerContainer, EntityManager $em, DepositRepository $depositRepo, RoundRepository $roundRepo)
 {
     $this->depositRepo = $depositRepo;
     $this->manager = $coinManagerContainer->get('main');
     $this->round = $roundRepo->findCurrent();
     $this->em = $em;
 }
Esempio n. 3
0
 public function __construct(WalletManager $walletManager, EntityManager $em, PayoutRepository $payoutRepo, RoundRepository $roundRep, DepositRepository $depositRepo)
 {
     $this->walletManager = $walletManager;
     $this->em = $em;
     $this->payoutRepo = $payoutRepo;
     $this->round = $roundRep->findCurrent();
     $this->depositRepo = $depositRepo;
 }
Esempio n. 4
0
 /**
  * @Route("/reset", name="reset")
  * @Template()
  */
 public function resetAction()
 {
     $round = $this->roundRepo->findCurrent();
     $this->getSession()->clear();
     return $this->redirect($this->generateUrl('stats', ['round' => $round->getId()]));
 }