<?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($ottBC) { self::$gates[] = $ottBC; } public function handle(Request $fzeTQ, \Closure $ayFRd) { goto uer9B; uer9B: if (method_exists(CurrentApp::class, 'set')) { CurrentApp::set(CurrentApp::API); } goto AjR5c; AP1pi: WidgetManager::registerBuiltinWidgets(); goto jRKVe; KHqsy: FieldManager::registerBuiltinFields(); goto AP1pi; AjR5c: foreach (self::$gates as $OV1o4) { goto U85XJ; u_1GC: $Z5nZL = $zVV30->check($fzeTQ); goto zDkvj; zDkvj: if (Response::isError($Z5nZL)) { return $Z5nZL; } goto jmicE; U85XJ: $zVV30 = app($OV1o4); goto u_1GC; jmicE: } goto KHqsy; jRKVe: if (file_exists($tqFow = modstart_admin_path('bootstrap.php'))) { require $tqFow; } goto CadH4; CadH4: return $ayFRd($fzeTQ); goto lo0Mh; lo0Mh: } }