<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace ModStart\App\Web\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 YcR4C; zx4mj: return $aPZzJ($cSn43); goto Ys17e; dP27n: if (file_exists($vaAeP = modstart_web_path('bootstrap.php'))) { require $vaAeP; } goto zx4mj; SoSQv: WidgetManager::registerBuiltinWidgets(); goto dP27n; YcR4C: if (method_exists(CurrentApp::class, 'set')) { CurrentApp::set(CurrentApp::WEB); } goto fg6dS; fg6dS: foreach (self::$gates as $nsWl0) { goto WJS1q; vmW8Y: if (Response::isError($UdQ1p)) { return $UdQ1p; } goto mrSSJ; WJS1q: $c42T4 = app($nsWl0); goto XWPT_; XWPT_: $UdQ1p = $c42T4->check($cSn43); goto vmW8Y; mrSSJ: } goto cvVTI; cvVTI: FieldManager::registerBuiltinFields(); goto SoSQv; Ys17e: } }