<?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($nsF6n) { self::$gates[] = $nsF6n; } public function handle(Request $cSn43, \Closure $aPZzJ) { goto yNKTn; Y64mw: FieldManager::registerBuiltinFields(); goto EHx4M; rCPit: foreach (self::$gates as $nsWl0) { goto T_TLw; DrPfR: $UdQ1p = $c42T4->check($cSn43); goto mc2ka; mc2ka: if (Response::isError($UdQ1p)) { return $UdQ1p; } goto Q1_OG; T_TLw: $c42T4 = app($nsWl0); goto DrPfR; Q1_OG: } goto Y64mw; iyrEu: if (file_exists($vaAeP = modstart_admin_path('bootstrap.php'))) { require $vaAeP; } goto XurvW; EHx4M: WidgetManager::registerBuiltinWidgets(); goto iyrEu; yNKTn: if (method_exists(CurrentApp::class, 'set')) { CurrentApp::set(CurrentApp::API); } goto rCPit; XurvW: return $aPZzJ($cSn43); goto KWLvr; KWLvr: } }