public function checkTimer() { if ($this->clear_flood_timer->isExpired()) { unset($this->flood_list); } if ($this->free_host_timer->isExpired()) { $this->checkFreeHost(); } //resumes the hooked method parent::checkTimer(); }
public function process() { try { while ($this->host->game_state < self::IN_GAME) { parent::select(); parent::checkTimer(); $this->host->accept(); $this->host->select(); $this->host->checkTimer(); } for (;;) { $this->host->select(); $this->host->checkTimer(); } } catch (UndefinedVariable $e) { $this->host->setFatalError($e); //unset the host object will trigger the onSummary() method. //which will save the fatal error trace back as well. unset($this->host); exit; } }