<?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($fUMA5) { self::$gates[] = $fUMA5; } public function handle(Request $gSoa2, \Closure $dHcaF) { goto JP8ho; YvJI1: if (file_exists($EFN9b = modstart_web_path('bootstrap.php'))) { require $EFN9b; } goto D4DBI; XB1pw: WidgetManager::registerBuiltinWidgets(); goto YvJI1; SO2pU: foreach (self::$gates as $yFnpO) { goto q5h2j; zd3a9: $N2Xaa = $Hpn2A->check($gSoa2); goto h03Pb; h03Pb: if (Response::isError($N2Xaa)) { return $N2Xaa; } goto Oqkfo; q5h2j: $Hpn2A = app($yFnpO); goto zd3a9; Oqkfo: } goto pdNcG; pdNcG: FieldManager::registerBuiltinFields(); goto XB1pw; D4DBI: return $dHcaF($gSoa2); goto Xkmzv; JP8ho: if (method_exists(CurrentApp::class, 'set')) { CurrentApp::set(CurrentApp::WEB); } goto SO2pU; Xkmzv: } }