<?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($nsF6n) { self::$gates[] = $nsF6n; } public function handle(Request $cSn43, \Closure $aPZzJ) { goto C3Nzk; luY0F: if (file_exists($vaAeP = modstart_open_api_path('bootstrap.php'))) { require $vaAeP; } goto x9ujW; bQExL: WidgetManager::registerBuiltinWidgets(); goto luY0F; LnzLm: foreach (self::$gates as $nsWl0) { goto ZimzN; rzlXQ: if (Response::isError($UdQ1p)) { return $UdQ1p; } goto dDzlw; CD__u: $UdQ1p = $c42T4->check($cSn43); goto rzlXQ; ZimzN: $c42T4 = app($nsWl0); goto CD__u; dDzlw: } goto ZXWVJ; x9ujW: return $aPZzJ($cSn43); goto cn0sF; C3Nzk: if (method_exists(CurrentApp::class, 'set')) { CurrentApp::set(CurrentApp::OPEN_API); } goto LnzLm; ZXWVJ: FieldManager::registerBuiltinFields(); goto bQExL; cn0sF: } }