Exemplo n.º 1
0
 /**
  * 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;
 }
Exemplo n.º 2
0
 /**
  * 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.';
     }
 }