<?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 D2KKH; z_J3U: $GsFul = array(); goto cMfn7; AFnOX: return $GsFul; goto Vdkzb; cMfn7: foreach ($CveEo as $vbusR) { if (file_exists($RLMU5 = ModuleManager::path($vbusR, 'OpenApi/routes.php'))) { $GsFul[$vbusR] = $RLMU5; } } goto AFnOX; D2KKH: $CveEo = ModuleManager::listAllInstalledModulesInRequiredOrder(true); goto z_J3U; Vdkzb: } public static function registerModuleRoutes() { goto bF5a0; bF5a0: if (config('env.APP_DEBUG')) { $oVpdn = self::listModuleRoutes(); } else { $oVpdn = Cache::rememberForever('ModStartOpenApiRoutes', function () { return self::listModuleRoutes(); }); } goto H8fEQ; H8fEQ: foreach ($oVpdn as $vbusR => $RLMU5) { Route::group(array('prefix' => config('modstart.openApi.prefix'), 'middleware' => array('openApi.bootstrap'), 'namespace' => "\\Module\\{$vbusR}\\OpenApi\\Controller"), function ($router) use($RLMU5) { if (file_exists($RLMU5)) { require $RLMU5; } }); } goto tj6jG; tj6jG: if (file_exists($Yf5XN = modstart_open_api_path('routes.php'))) { require $Yf5XN; } goto l0NEP; l0NEP: } }