<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace ModStart\App\OpenApi; use Illuminate\Support\Facades\Cache; use Illuminate\Support\Facades\Route; use ModStart\Module\ModuleManager; class ModStartOpenApi { private static function listModuleRoutes() { goto uqjiu; aDjPM: $jByvU = array(); goto VHUAq; VHUAq: foreach ($qDH10 as $GVDx3) { if (file_exists($qsQD8 = ModuleManager::path($GVDx3, 'OpenApi/routes.php'))) { $jByvU[$GVDx3] = $qsQD8; } } goto TWtnJ; uqjiu: $qDH10 = ModuleManager::listAllInstalledModulesInRequiredOrder(true); goto aDjPM; TWtnJ: return $jByvU; goto m2L03; m2L03: } public static function registerModuleRoutes() { goto yuyAd; GDekB: foreach ($OpzDn as $GVDx3 => $qsQD8) { Route::group(array('prefix' => config('modstart.openApi.prefix'), 'middleware' => array('openApi.bootstrap'), 'namespace' => "\\Module\\{$GVDx3}\\OpenApi\\Controller"), function ($router) use($qsQD8) { if (file_exists($qsQD8)) { require $qsQD8; } }); } goto kIt_a; yuyAd: if (config('env.APP_DEBUG')) { $OpzDn = self::listModuleRoutes(); } else { $OpzDn = Cache::rememberForever('ModStartOpenApiRoutes', function () { return self::listModuleRoutes(); }); } goto GDekB; kIt_a: if (file_exists($OQTZC = modstart_open_api_path('routes.php'))) { require $OQTZC; } goto iar_i; iar_i: } }