<?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($q5sLX) { self::$gates[] = $q5sLX; } public function handle(Request $U5_Oe, \Closure $pnI5g) { goto zyCLy; tGJo1: foreach (self::$gates as $ZpLX1) { goto F2paS; F2paS: $Y0BWS = app($ZpLX1); goto cXCDE; dNkIm: if (Response::isError($pTwJr)) { return $pTwJr; } goto I7IQR; cXCDE: $pTwJr = $Y0BWS->check($U5_Oe); goto dNkIm; I7IQR: } goto qxOkq; pcHwi: if (file_exists($CClCl = modstart_admin_path('bootstrap.php'))) { require $CClCl; } goto StwC0; qxOkq: FieldManager::registerBuiltinFields(); goto VzxN5; StwC0: return $pnI5g($U5_Oe); goto D7WsJ; zyCLy: if (method_exists(CurrentApp::class, 'set')) { CurrentApp::set(CurrentApp::API); } goto tGJo1; VzxN5: WidgetManager::registerBuiltinWidgets(); goto pcHwi; D7WsJ: } }