<?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($lIzQw) { self::$gates[] = $lIzQw; } public function handle(Request $RDnT0, \Closure $LeO9R) { goto vnXcG; Oa52a: return $LeO9R($RDnT0); goto yVu2D; vnXcG: if (method_exists(CurrentApp::class, 'set')) { CurrentApp::set(CurrentApp::WEB); } goto gEHI3; ZxMA1: if (file_exists($LxNX5 = modstart_web_path('bootstrap.php'))) { require $LxNX5; } goto Oa52a; gEHI3: foreach (self::$gates as $V563N) { goto o8Bk0; o8Bk0: $LmMYX = app($V563N); goto wEQ3T; wEQ3T: $gbVzz = $LmMYX->check($RDnT0); goto KUELs; KUELs: if (Response::isError($gbVzz)) { return $gbVzz; } goto raB3I; raB3I: } goto VdO5I; VdO5I: FieldManager::registerBuiltinFields(); goto z4WqB; z4WqB: WidgetManager::registerBuiltinWidgets(); goto ZxMA1; yVu2D: } }