コード例 #1
0
ファイル: bracket.php プロジェクト: HardSkript/anime-bracket
 /**
  * Advances the bracket to the next tier/group
  */
 public function advance()
 {
     // Lock the bracket
     $cacheKey = $this->_lockedCacheKey();
     Lib\Cache::set($cacheKey, true, CACHE_MEDIUM);
     switch ($this->state) {
         case BS_ELIMINATIONS:
             $this->_advanceEliminations();
             break;
         case BS_VOTING:
             $this->_advanceBracket();
             Stats::getEntrantPerformanceStats($this, true);
             break;
     }
     // Force update various cached things
     $this->getResults(true);
     Round::getCurrentRounds($this->id, true);
     // Unlock. Keep this on a short cache since it'll default back to false anyways
     Lib\Cache::set($cacheKey, false, CACHE_SHORT);
 }