<?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 c7dkd; c7dkd: $sywti = ModuleManager::listAllInstalledModulesInRequiredOrder(true); goto SEVDZ; SEVDZ: $qwIog = array(); goto vBMhl; vBMhl: foreach ($sywti as $CiBrR) { if (file_exists($yHf3t = ModuleManager::path($CiBrR, 'OpenApi/routes.php'))) { $qwIog[$CiBrR] = $yHf3t; } } goto eeVRt; eeVRt: return $qwIog; goto BsA92; BsA92: } public static function registerModuleRoutes() { goto MjXJg; Vr69N: foreach ($a8f31 as $CiBrR => $yHf3t) { Route::group(array('prefix' => config('modstart.openApi.prefix'), 'middleware' => array('openApi.bootstrap'), 'namespace' => "\\Module\\{$CiBrR}\\OpenApi\\Controller"), function ($router) use($yHf3t) { if (file_exists($yHf3t)) { require $yHf3t; } }); } goto t4KN3; MjXJg: if (config('env.APP_DEBUG')) { $a8f31 = self::listModuleRoutes(); } else { $a8f31 = Cache::rememberForever('ModStartOpenApiRoutes', function () { return self::listModuleRoutes(); }); } goto Vr69N; t4KN3: if (file_exists($Qkds9 = modstart_open_api_path('routes.php'))) { require $Qkds9; } goto P7s5w; P7s5w: } }