コード例 #1
0
 /**
  * Overloads the BBModel save() so we can define additional arguments to send
  * 
  * {@inheritdoc}
  */
 public function save($return_result = false, $child_args = null)
 {
     //Report() before saving
     if (is_null($this->id)) {
         return $this->report();
     }
     //Already exists - let BBModel update basic settings (notes is the only thing really that can be updated this way)
     if (!parent::save(false, null)) {
         return false;
     }
     //Update all game details
     if (!$this->save_games()) {
         return false;
     }
     //Wipe all tournament cache
     $this->tournament->clear_id_cache();
     //Success! return id for consistency
     return $this->id;
 }
コード例 #2
0
 /**
  * Overloads the list-clearing method so we can
  *  specify clear tournament-object cache
  *
  * {@inheritdoc}
  */
 public function clear_list_cache()
 {
     if (!is_null($this->tournament)) {
         $this->tournament->clear_id_cache(BBTournament::SERVICE_LOAD_ROUNDS);
     }
 }