/** * Gets the site object for the game * @return the game site object */ public static function getSite() { if (self::$site == null) { self::$site = Model_Game_Site::getSite(Kohana::config('myshot.key')); } return self::$site; }
/** * Registers ths site with the game database * @author Brent Allen * @return void */ public function action_register() { if ($this->active) { $site = ORM::factory('Game_Site'); $site->name = "National Geographic Kids"; $site->url = "kids-myshot.nationalgeographic.com/"; $site->apikey = Model_Game_Site::buildKey(); $site->save(); $this->template->content = $site->apikey; $this->template->content .= '<br />Initializing. . .'; } else { $this->template->content = 'Initialized.'; } }