default->design->package->name; $theme = (string)$_xml->install->design->theme->default; $skin = (string)$_xml->stores->admin->design->theme->skin; $isProffessional = ($package == self::PROFESSIONAL_DESIGN_NAME) && ($theme == self::PROFESSIONAL_DESIGN_NAME) && ($skin == self::PROFESSIONAL_DESIGN_NAME); if ($isProffessional) { self::$_platform = self::PE_PLATFORM; return self::$_platform; } self::$_platform = self::EE_PLATFORM; return self::$_platform; } self::$_platform = self::EE_PLATFORM; } } return self::$_platform; } /** * Convert platform from string to int and backwards * @static * @param $platformCode * @return int|string */ public static function convertPlatform($platformCode) { if (is_numeric($platformCode)) { // Convert predefined to letters code $platform = ($platformCode == self::EE_PLATFORM ? 'ee' : ($platformCode == self::PE_PLATFORM ? 'pe' : 'ce')); } elseif (is_string($platformCode)) { $platformCode = strtolower($platformCode); $platform = ($platformCode == 'ee' ? self::EE_PLATFORM : ($platformCode == 'pe' ? self::PE_PLATFORM : self::CE_PLATFORM)); }else{$platform = self::CE_PLATFORM;} return $platform; } public static function convertVersion($v) { $digits = @explode(".", $v); $version = 0; if (is_array($digits)) { foreach ($digits as $k => $v) { $version += ($v * pow(10, max(0, (3 - $k)))); } } return $version; } }