/** * 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); }
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(); } }
/** * 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); } }