<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace ModStart\App\OpenApi\Middleware; use Illuminate\Http\Request; use ModStart\App\Core\AccessGate; use ModStart\App\Core\CurrentApp; use ModStart\Core\Input\Response; use ModStart\Support\Manager\FieldManager; use ModStart\Support\Manager\WidgetManager; class BootstrapMiddleware { private static $gates = array(); public static function addGate($fUMA5) { self::$gates[] = $fUMA5; } public function handle(Request $gSoa2, \Closure $dHcaF) { goto mLGN3; EnLWc: return $dHcaF($gSoa2); goto dfAkd; V8a3F: foreach (self::$gates as $yFnpO) { goto sF8G6; sF8G6: $Hpn2A = app($yFnpO); goto ANAOk; ANAOk: $N2Xaa = $Hpn2A->check($gSoa2); goto tYRAN; tYRAN: if (Response::isError($N2Xaa)) { return $N2Xaa; } goto T1dxP; T1dxP: } goto gdLe2; gdLe2: FieldManager::registerBuiltinFields(); goto O8wnR; mLGN3: if (method_exists(CurrentApp::class, 'set')) { CurrentApp::set(CurrentApp::OPEN_API); } goto V8a3F; qbe9q: if (file_exists($EFN9b = modstart_open_api_path('bootstrap.php'))) { require $EFN9b; } goto EnLWc; O8wnR: WidgetManager::registerBuiltinWidgets(); goto qbe9q; dfAkd: } }