コード例 #1
0
ファイル: complete_level.php プロジェクト: GothamGazette/Maze
 /**
  * Create widget
  *
  */
 private function _createWidget()
 {
     $session = new Gamesession_delegate($this->gamesession->getId());
     $session->load();
     //TODO: Actual image generation
     $this->_widget = img(self::WIDGET_PATH_PREFIX . $session->hash);
 }
コード例 #2
0
ファイル: gamesession.php プロジェクト: GothamGazette/Maze
 private function _loadDBSession()
 {
     $db_session = new Gamesession_delegate($this->id);
     $db_session->load();
     if (true === empty($db_session->id)) {
         ObjectHelper::shallowCopy($this, $db_session);
         $db_session->store();
         $this->id = $db_session->id;
         $this->_refreshSession();
     }
 }
コード例 #3
0
ファイル: maze.php プロジェクト: GothamGazette/Maze
 /**
  * Get the badge
  *
  * @param string $hash
  */
 public function badges($hash)
 {
     $session = new Gamesession_delegate();
     $session->load($hash, 'hash');
     if (true === empty($session->id)) {
         show_404();
     } else {
         //TODO: Show actual widget
         $this->load->helper('badge');
         Badge_helper::displayBadge($session);
     }
 }