Exemplo n.º 1
0
 protected function check()
 {
     $gameRepository = new GameRepository();
     $gameRepository->addAdditionalWhere(array('column' => 'room', 'value' => $this->room['id']));
     $gameRepository->addAdditionalWhere(array('column' => 'status', 'value' => array(Game::GAME_STATUS_CREATED, Game::GAME_STATUS_STARTED), 'xxx' => 'IN'));
     $count = $gameRepository->getCountAll();
     if ($count > 0) {
         $this->check = FALSE;
     } else {
         $this->check = TRUE;
     }
 }