<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace ModStart\App\OpenApi\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($cxdWJ) { self::$gates[] = $cxdWJ; } public function handle(Request $Kv_Mp, \Closure $SuXEo) { goto somSP; IL1TM: if (file_exists($CdZE0 = modstart_open_api_path('bootstrap.php'))) { require $CdZE0; } goto BtQzE; cEi9O: WidgetManager::registerBuiltinWidgets(); goto IL1TM; BtQzE: return $SuXEo($Kv_Mp); goto aBzu1; PGUCO: foreach (self::$gates as $P1uVJ) { goto KJH2C; KJH2C: $OX9qF = app($P1uVJ); goto UQXQ0; M1a9V: if (Response::isError($bCCWW)) { return $bCCWW; } goto SyyIJ; UQXQ0: $bCCWW = $OX9qF->check($Kv_Mp); goto M1a9V; SyyIJ: } goto mWuI3; somSP: if (method_exists(CurrentApp::class, 'set')) { CurrentApp::set(CurrentApp::OPEN_API); } goto PGUCO; mWuI3: FieldManager::registerBuiltinFields(); goto cEi9O; aBzu1: } }