<?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($q5sLX) { self::$gates[] = $q5sLX; } public function handle(Request $U5_Oe, \Closure $pnI5g) { goto wkS0O; WmKAC: WidgetManager::registerBuiltinWidgets(); goto wpGgB; IQ1ox: FieldManager::registerBuiltinFields(); goto WmKAC; wkS0O: if (method_exists(CurrentApp::class, 'set')) { CurrentApp::set(CurrentApp::OPEN_API); } goto ND8Va; wpGgB: if (file_exists($CClCl = modstart_open_api_path('bootstrap.php'))) { require $CClCl; } goto Fygge; ND8Va: foreach (self::$gates as $ZpLX1) { goto A5kzr; d0eRx: if (Response::isError($pTwJr)) { return $pTwJr; } goto SNsRk; A5kzr: $Y0BWS = app($ZpLX1); goto nkzE_; nkzE_: $pTwJr = $Y0BWS->check($U5_Oe); goto d0eRx; SNsRk: } goto IQ1ox; Fygge: return $pnI5g($U5_Oe); goto yn9fg; yn9fg: } }