<?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($qeBS4) { self::$gates[] = $qeBS4; } public function handle(Request $hoJyG, \Closure $dkWaY) { goto vmVBt; UQ7ZY: return $dkWaY($hoJyG); goto drddu; D90f0: if (file_exists($ucB3J = modstart_open_api_path('bootstrap.php'))) { require $ucB3J; } goto UQ7ZY; EKM1g: FieldManager::registerBuiltinFields(); goto Dxclw; vmVBt: if (method_exists(CurrentApp::class, 'set')) { CurrentApp::set(CurrentApp::OPEN_API); } goto zL7oj; zL7oj: foreach (self::$gates as $Esk0p) { goto lVSOK; lVSOK: $bj0Ay = app($Esk0p); goto Lmu7V; Lmu7V: $ZIe4d = $bj0Ay->check($hoJyG); goto SB8EG; SB8EG: if (Response::isError($ZIe4d)) { return $ZIe4d; } goto otojU; otojU: } goto EKM1g; Dxclw: WidgetManager::registerBuiltinWidgets(); goto D90f0; drddu: } }