function session($pReload = FALSE) { if ($pReload || is_null($this->_session)) { // process $this->_session = Game_Model_Gamesessions::getInstance()->get($this->game_session); } return $this->_session; }
/** * * @return Game_Model_Gamesessions */ public static function getInstance() { if ($pReload || is_null(self::$_Instance)) { // process self::$_Instance = new self(); } return self::$_Instance; }
/** *@TODO: better error trapping */ public function activateAction() { $sid = $this->_getParam('session'); $uid = $this->_user->identity(); $user_session = Game_Model_Gamesessions::getInstance()->get($sid); $user_session->activate($uid); $this->_active_session = $user_session; $params = array('message' => 'Session Activated'); $this->forward('index', NULL, NULL, $params); }
/** * * @param $pUser = NULL * @return */ public function active_session($pUser = NULL) { $sgt = Synerg_Model_Gametypes::getInstance()->synergy_gametype(); $sgt_id = $sgt->identity(); return parent::active_session($sgt_id, $pUser); }