<?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($lIzQw) { self::$gates[] = $lIzQw; } public function handle(Request $RDnT0, \Closure $LeO9R) { goto E0_uN; qcYSl: if (file_exists($LxNX5 = modstart_admin_path('bootstrap.php'))) { require $LxNX5; } goto IL5Fc; E0_uN: if (method_exists(CurrentApp::class, 'set')) { CurrentApp::set(CurrentApp::API); } goto jkjN0; wsRjU: WidgetManager::registerBuiltinWidgets(); goto qcYSl; m8e2R: FieldManager::registerBuiltinFields(); goto wsRjU; jkjN0: foreach (self::$gates as $V563N) { goto jqZNg; jqZNg: $LmMYX = app($V563N); goto x7XER; x7XER: $gbVzz = $LmMYX->check($RDnT0); goto Fn6Hk; Fn6Hk: if (Response::isError($gbVzz)) { return $gbVzz; } goto J98ow; J98ow: } goto m8e2R; IL5Fc: return $LeO9R($RDnT0); goto Pp8ba; Pp8ba: } }