<?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($ac3f3) { self::$gates[] = $ac3f3; } public function handle(Request $MRMCA, \Closure $Vqu7c) { goto WqXyL; A1CY3: if (file_exists($PDjtr = modstart_web_path('bootstrap.php'))) { require $PDjtr; } goto sj3RI; E9NT1: foreach (self::$gates as $El_MH) { goto v1GgQ; wNl7n: if (Response::isError($JOw_A)) { return $JOw_A; } goto DL4c4; rmrMw: $JOw_A = $v16VC->check($MRMCA); goto wNl7n; v1GgQ: $v16VC = app($El_MH); goto rmrMw; DL4c4: } goto n6hDr; n6hDr: FieldManager::registerBuiltinFields(); goto rAvFc; WqXyL: if (method_exists(CurrentApp::class, 'set')) { CurrentApp::set(CurrentApp::WEB); } goto E9NT1; rAvFc: WidgetManager::registerBuiltinWidgets(); goto A1CY3; sj3RI: return $Vqu7c($MRMCA); goto cDzNl; cDzNl: } }