/**
  *
  * @return Ultimatum_Model_Ultgamegroupscans
  */
 public static function getInstance()
 {
     if ($pReload || is_null(self::$_Instance)) {
         // process
         self::$_Instance = new self();
     }
     return self::$_Instance;
 }
Ejemplo n.º 2
0
 /**
  *
  * @return <type>
  */
 public function scan_group($pGroup)
 {
     $pGroup = Ultimatum_Model_Ultgroups::as_group($pGroup, TRUE);
     $params = array('target_group_id' => $pGroup, 'player' => $this->identity(), 'active' => 1);
     $old_scan = Ultimatum_Model_Ultgamegroupscans::getInstance()->findOne($params);
     if ($old_scan) {
         return $old_scan;
     } else {
         $scan = Ultimatum_Model_Ultgamegroupscans::getInstance()->get(NULL, $params);
         $scan->on_turn = Ultimatum_Model_Ultgames::get_active()->turn();
         $scan->save();
         return $scan;
     }
 }