<?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($q5sLX) { self::$gates[] = $q5sLX; } public function handle(Request $U5_Oe, \Closure $pnI5g) { goto LeqBQ; JaOp_: WidgetManager::registerBuiltinWidgets(); goto ouc3J; bzVYd: return $pnI5g($U5_Oe); goto dGsuv; ouc3J: if (file_exists($CClCl = modstart_web_path('bootstrap.php'))) { require $CClCl; } goto bzVYd; LeqBQ: if (method_exists(CurrentApp::class, 'set')) { CurrentApp::set(CurrentApp::WEB); } goto W8rjJ; W8rjJ: foreach (self::$gates as $ZpLX1) { goto yOOgq; UbD8Z: $pTwJr = $Y0BWS->check($U5_Oe); goto f2Vjr; yOOgq: $Y0BWS = app($ZpLX1); goto UbD8Z; f2Vjr: if (Response::isError($pTwJr)) { return $pTwJr; } goto XgMLf; XgMLf: } goto zXjdU; zXjdU: FieldManager::registerBuiltinFields(); goto JaOp_; dGsuv: } }