<?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($qeBS4) { self::$gates[] = $qeBS4; } public function handle(Request $hoJyG, \Closure $dkWaY) { goto jFJvC; CXDoa: if (file_exists($ucB3J = modstart_web_path('bootstrap.php'))) { require $ucB3J; } goto I_cGL; rk3x3: WidgetManager::registerBuiltinWidgets(); goto CXDoa; jFJvC: if (method_exists(CurrentApp::class, 'set')) { CurrentApp::set(CurrentApp::WEB); } goto DfT1h; oE0wb: FieldManager::registerBuiltinFields(); goto rk3x3; I_cGL: return $dkWaY($hoJyG); goto ZxtUG; DfT1h: foreach (self::$gates as $Esk0p) { goto aATCU; kDRzq: $ZIe4d = $bj0Ay->check($hoJyG); goto zjm54; zjm54: if (Response::isError($ZIe4d)) { return $ZIe4d; } goto rcFz8; aATCU: $bj0Ay = app($Esk0p); goto kDRzq; rcFz8: } goto oE0wb; ZxtUG: } }