<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace ModStart\App\Api\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 Pbx6A; jif62: return $dkWaY($hoJyG); goto bhX9j; gkQtU: WidgetManager::registerBuiltinWidgets(); goto ZJ_Tv; bx0Ia: foreach (self::$gates as $Esk0p) { goto rMeTk; w90Ww: if (Response::isError($ZIe4d)) { return $ZIe4d; } goto TdoiX; qyuC2: $ZIe4d = $bj0Ay->check($hoJyG); goto w90Ww; rMeTk: $bj0Ay = app($Esk0p); goto qyuC2; TdoiX: } goto ecV1J; ZJ_Tv: if (file_exists($ucB3J = modstart_admin_path('bootstrap.php'))) { require $ucB3J; } goto jif62; ecV1J: FieldManager::registerBuiltinFields(); goto gkQtU; Pbx6A: if (method_exists(CurrentApp::class, 'set')) { CurrentApp::set(CurrentApp::API); } goto bx0Ia; bhX9j: } }