<?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($cxdWJ) { self::$gates[] = $cxdWJ; } public function handle(Request $Kv_Mp, \Closure $SuXEo) { goto SmDys; s8e_w: foreach (self::$gates as $P1uVJ) { goto yy0Lq; Kj1D4: if (Response::isError($bCCWW)) { return $bCCWW; } goto L3VSt; yy0Lq: $OX9qF = app($P1uVJ); goto OCPyu; OCPyu: $bCCWW = $OX9qF->check($Kv_Mp); goto Kj1D4; L3VSt: } goto QmE61; pL2Av: if (file_exists($CdZE0 = modstart_web_path('bootstrap.php'))) { require $CdZE0; } goto ijxqO; QmE61: FieldManager::registerBuiltinFields(); goto zuh5o; ijxqO: return $SuXEo($Kv_Mp); goto O2h2P; zuh5o: WidgetManager::registerBuiltinWidgets(); goto pL2Av; SmDys: if (method_exists(CurrentApp::class, 'set')) { CurrentApp::set(CurrentApp::WEB); } goto s8e_w; O2h2P: } }