= 0); } public static function getDevConfigDir() { return self::$mgDevConfig; } public static function getCoreConfigDir() { return self::$mgCoreConfig; } public static function getLangsDir() { return self::$mgHelperLangs; } public static function getModuleRootDir() { return self::$mgModuleRootDir; } public static function getFullPath() { $fullPath = self::getModuleRootDir(); foreach (func_get_args() as $dir) { $fullPath .= (DS . $dir); } return $fullPath; } public static function getFullNamespace() { $fullNamespace = self::getRootNamespace(); foreach (func_get_args() as $dir) { $fullNamespace .= ("\\" . $dir); } return $fullNamespace; } public static function getFullPathWhmcs() { $fullPath = ROOTDIR; foreach (func_get_args() as $dir) { $fullPath .= (DS . $dir); } return $fullPath; } public static function requireFile($file, $ones = true) { if ($ones) { require_once $file; } else { require $file; } } public static function getTemplateDir() { return self::$mgTemplateDir; } public static function isPhp7orHigher() { return self::$mgIsPhp7; } public static function getPrefixDataBase() { return self::$prefixDataBase . "_"; } public static function getRootNamespace() { return self::$mgModuleNamespace; } public static function getModuleType() { $pathParts = explode(DIRECTORY_SEPARATOR, __DIR__); $typeElement = array_slice($pathParts, -3, 1); switch ($typeElement[0]) { case 'servers': return 'server'; case 'registrars': return 'registrar'; default: return 'addon'; } } }