/** * @fn static public function eps_register() * @brief Register * * Register the system and starting the shop * * @author Ruben Storm * @version 0.0.5 * @since 0.0.5 */ public static function eps_register() { /* register everthing what have to be registered */ libDefine::mk_define(); libTheme::mk_theme(); libShopData::getShop(); shopControler::checkShop(); libShopData::getShop(); libErrors::_getError(); self::_get_Theme(); }
/** * @fn mk_theme() * @brief Theme maker * * Make the theme, this has to be twice taken in the driver * * @author Ruben Storm * @version 0.0.5 * @since 0.0.5 * @return */ public static function mk_theme() { if (shopControler::_checkSingle('USE_THEME') == false) { self::_getThemeName(); return; } else { // keep going with the theme self::getThemeFilesystem(); return self::getThemeFilesystem(); } return; }
/** * @fn mk_Errors($message, $id) * @brief Make the error * * The error maker, main object to make an error, call this from other * classes if an error happen * * @version 0.0.5 * @since Version 0.0.5 * @author Ruben Storm * @param string $message * the error message that throw * @param string $id * the id, 0 or 1, if 1 it will throw an error * @return */ public static function mk_Errors($message, $id) { // make the Errors if (shopControler::_checkSingle('SYSTEM_ERROR') == false) { libDefine::_definer('SYSTEM_ERROR', $id); libDefine::_definer('SYSTEM_ERROR_MESS', $message); } return; }
/** * @fn _getShopMeta() * @brief Query shop meta * * Loading the shop meta * * @version 0.0.5 * @since 0.0.3 * @author Ruben Storm * @return */ private static function _getShopMeta() { // get the Shop Meta if (shopControler::_checkSingle('USE_THEME') == true) { self::$shopMetaThemeFile = self::$shopMetaThemeFolder . USE_THEME . '/theme.xml'; if (file_exists(self::$shopMetaThemeFile)) { $xml = simplexml_load_file(self::$shopMetaThemeFile); foreach ($xml->settings as $settings) { libDefine::_definer('THEME_SETTINGS_NAME', $settings->name); libDefine::_definer('THEME_SETTINGS_VERSION', $settings->version); libDefine::_definer('THEME_SETTINGS_SCREEN', $settings->screen); libDefine::_definer('THEME_SETTINGS_FORVERSION', $settings->forVersion); libDefine::_definer('THEME_SETTINGS_AUTHOR', $settings->author); libDefine::_definer('THEME_SETTINGS_HOMEPAGE', '<a href="' . $settings->homepage . '" target="_blank">' . $settings->homepage . '</a>'); libDefine::_definer('THEME_SETTINGS_EMAIL', $settings->contact->email); libDefine::_definer('THEME_SETTINGS_CONTACT_STREET', $settings->contact->street); libDefine::_definer('THEME_SETTINGS_CONTACT_CITY', $settings->contact->city); libDefine::_definer('THEME_SETTINGS_CONTACT_COUNTRY', $settings->contact->country); libDefine::_definer('THEME_SETTINGS_MOREINFO', $settings->moreInformation); libDefine::_definer('THEME_SETTINGS_DONATE', $settings->donate->allow); libDefine::_definer('THEME_SETTINGS_DONATE_EMAIL', $settings->donate->email); libDefine::_definer('THEME_SETTINGS_DONATE_WEBSEITE', '<a href="' . $settings->donate->website . '" target="_blank">' . $settings->donate->website . '</a>'); } libDefine::_definer('SHOP_META_READY', 1); } else { self::$errorMessage = 'Theme File (' . self::$shopMetaThemeFile . ') does not exists'; libErrors::mk_Errors(self::$errorMessage, 1); } if (shopControler::_checkSingle('SYSTEM_ERROR_DATA') == true && SYSTEM_ERROR_DATA == 1) { libDefine::_definer('SYSTEM_ERROR_DATA', 0); libErrors::mk_Errors('', 0); } } else { libErrors::mk_Errors(self::$errorMessage, 1); } return; }