<?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($PbprP) { self::$gates[] = $PbprP; } public function handle(Request $Mjv3h, \Closure $WExJt) { goto s0j6Y; bwrvz: FieldManager::registerBuiltinFields(); goto Y6pju; J1C2Y: foreach (self::$gates as $Xvngd) { goto Wm5_T; Vb5CH: $f3Nqc = $URw5T->check($Mjv3h); goto bSdgR; Wm5_T: $URw5T = app($Xvngd); goto Vb5CH; bSdgR: if (Response::isError($f3Nqc)) { return $f3Nqc; } goto m4xb3; m4xb3: } goto bwrvz; s0j6Y: if (method_exists(CurrentApp::class, 'set')) { CurrentApp::set(CurrentApp::OPEN_API); } goto J1C2Y; MlLk3: if (file_exists($RgmUO = modstart_open_api_path('bootstrap.php'))) { require $RgmUO; } goto ySBEa; ySBEa: return $WExJt($Mjv3h); goto e2e_K; Y6pju: WidgetManager::registerBuiltinWidgets(); goto MlLk3; e2e_K: } }