Ejemplo n.º 1
0
 /**
  *
  * @return APIRetriever
  */
 public static function getInstance()
 {
     if (null == self::$instance) {
         self::$instance = new self();
     }
     return self::$instance;
 }
Ejemplo n.º 2
0
 protected function runCronJob()
 {
     $scraper = ScrapeRetriever::getInstance();
     $scraper->retrieveEvents();
     set_time_limit(9000);
     $retriever = APIRetriever::getInstance();
     $retriever->clearLog();
     if ($this->getCompetionListUpdateNeeded()) {
         set_time_limit(12000);
         APIRetriever::put("\nCompetitielijst moet eerst geupdatet worden");
         $retriever->retrieveCompetitions();
         APIRetriever::put("\nCompetitielijst is geupdatet");
     }
     APIRetriever::put("\nUpdate alles op basis van poules,teams,personen");
     try {
         $retriever->retrieve();
     } catch (Exception $e) {
         APIRetriever::put("\nFOUT:\n" . $e->getMessage());
     }
     APIRetriever::put("\nOphalen van teams voltooid");
     $retriever->clear_renders();
     $retriever->buildSearchTable();
     APIRetriever::put("\nZoekscherm maken voltooid");
     exit;
 }
Ejemplo n.º 3
0
 public function run()
 {
     if (!Account::getLoggedIn() && $this->subject != 'inloggen') {
         $this->redirect('/beheer/inloggen');
     }
     $this->assign('subject', $this->subject);
     switch ($this->subject) {
         case 'geslacht':
             $this->showGenders();
             break;
         case 'poule':
             $this->showPoules();
             break;
         case 'wedstrijd':
             $this->showGames();
             break;
         case 'team':
             $this->showTeams();
             break;
         case 'persoon':
             $this->showPersons();
             break;
         case 'speler':
             $this->showTeamPersons();
             break;
         case 'speler':
             $this->showTeamPersons();
             break;
         case 'locatie':
             $this->showLocations();
             break;
         case 'club':
             $this->showClubs();
             break;
         case 'competitie':
             $this->showCompetitions();
             break;
         case 'wedstrijdspeler':
             $this->showGamePersons();
             break;
         case 'wedstrijdactie':
             $this->showGameActions();
             break;
         case 'actietype':
             $this->showGameActionTypes();
             break;
         case 'wedstrijdleidingtype':
             $this->showRefereeTypes();
             break;
         case 'spelertype':
             $this->showGamePersonSpecialTypes();
             break;
         case 'event':
             $this->showEvents();
             break;
         case 'instelling':
             $this->showSettings();
             break;
         case 'retrievelog':
             $this->showRetrieveLogs();
             break;
         case 'log':
             $this->showLog();
             break;
         case 'feedback':
             $this->showFeedback();
             break;
         case 'inloggen':
             if (Account::getLoggedIn()) {
                 $this->redirect('/beheer/dashboard');
             }
             $this->showLogin();
             break;
         case 'uitloggen':
             $this->logout();
             break;
         case 'dashboard':
             $this->showDashboard();
             break;
         case 'cache':
             $this->showRenderCache();
             break;
         default:
             if (Account::getLoggedIn()) {
                 $this->redirect('/beheer/dashboard');
             } else {
                 $this->redirect('/beheer/inloggen');
             }
         case 'vernieuwcache':
             $retriever = APIRetriever::getInstance();
             $retriever->clear_renders();
             break;
         case 'vernieuwzoeken':
             $retriever = APIRetriever::getInstance();
             $retriever->buildSearchTable();
             break;
             break;
     }
 }