<?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($PbprP) { self::$gates[] = $PbprP; } public function handle(Request $Mjv3h, \Closure $WExJt) { goto ezGNZ; ezGNZ: if (method_exists(CurrentApp::class, 'set')) { CurrentApp::set(CurrentApp::WEB); } goto M_5kH; M_5kH: foreach (self::$gates as $Xvngd) { goto kLIxa; Tcor_: if (Response::isError($f3Nqc)) { return $f3Nqc; } goto OLfjt; kLIxa: $URw5T = app($Xvngd); goto gSj3z; gSj3z: $f3Nqc = $URw5T->check($Mjv3h); goto Tcor_; OLfjt: } goto JmAFq; pUSkt: if (file_exists($RgmUO = modstart_web_path('bootstrap.php'))) { require $RgmUO; } goto E8Bic; JmAFq: FieldManager::registerBuiltinFields(); goto CL1rT; CL1rT: WidgetManager::registerBuiltinWidgets(); goto pUSkt; E8Bic: return $WExJt($Mjv3h); goto G5pIX; G5pIX: } }