<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace ModStart\App\Api\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($ac3f3) { self::$gates[] = $ac3f3; } public function handle(Request $MRMCA, \Closure $Vqu7c) { goto O76vI; xwUnU: FieldManager::registerBuiltinFields(); goto PDscb; O76vI: if (method_exists(CurrentApp::class, 'set')) { CurrentApp::set(CurrentApp::API); } goto SNHfV; SNHfV: foreach (self::$gates as $El_MH) { goto uPwlR; uPwlR: $v16VC = app($El_MH); goto qzSCh; HKjc3: if (Response::isError($JOw_A)) { return $JOw_A; } goto aErmq; qzSCh: $JOw_A = $v16VC->check($MRMCA); goto HKjc3; aErmq: } goto xwUnU; MRcun: return $Vqu7c($MRMCA); goto SPV3S; PDscb: WidgetManager::registerBuiltinWidgets(); goto c5Mrl; c5Mrl: if (file_exists($PDjtr = modstart_admin_path('bootstrap.php'))) { require $PDjtr; } goto MRcun; SPV3S: } }