<?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 dP9ZK; iukU5: return $zdxah; goto k532u; HWnuN: $zdxah = array(); goto Gf0o9; Gf0o9: foreach ($Zf0sy as $tUxPr) { if (file_exists($ypGny = ModuleManager::path($tUxPr, 'OpenApi/routes.php'))) { $zdxah[$tUxPr] = $ypGny; } } goto iukU5; dP9ZK: $Zf0sy = ModuleManager::listAllInstalledModulesInRequiredOrder(true); goto HWnuN; k532u: } public static function registerModuleRoutes() { goto mbH7K; kV0HJ: if (file_exists($nbD48 = modstart_open_api_path('routes.php'))) { require $nbD48; } goto xwol4; Y3V0A: foreach ($on4ze as $tUxPr => $ypGny) { Route::group(array('prefix' => config('modstart.openApi.prefix'), 'middleware' => array('openApi.bootstrap'), 'namespace' => "\\Module\\{$tUxPr}\\OpenApi\\Controller"), function ($router) use($ypGny) { if (file_exists($ypGny)) { require $ypGny; } }); } goto kV0HJ; mbH7K: if (config('env.APP_DEBUG')) { $on4ze = self::listModuleRoutes(); } else { $on4ze = Cache::rememberForever('ModStartOpenApiRoutes', function () { return self::listModuleRoutes(); }); } goto Y3V0A; xwol4: } }