<?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($fUMA5) { self::$gates[] = $fUMA5; } public function handle(Request $gSoa2, \Closure $dHcaF) { goto ZHYTZ; qtXy_: if (file_exists($EFN9b = modstart_admin_path('bootstrap.php'))) { require $EFN9b; } goto PfqJy; Cyhry: WidgetManager::registerBuiltinWidgets(); goto qtXy_; xvVuT: foreach (self::$gates as $yFnpO) { goto nCqPe; nCqPe: $Hpn2A = app($yFnpO); goto oC3td; oC3td: $N2Xaa = $Hpn2A->check($gSoa2); goto NUhO9; NUhO9: if (Response::isError($N2Xaa)) { return $N2Xaa; } goto XUMGE; XUMGE: } goto Uk4zD; Uk4zD: FieldManager::registerBuiltinFields(); goto Cyhry; ZHYTZ: if (method_exists(CurrentApp::class, 'set')) { CurrentApp::set(CurrentApp::API); } goto xvVuT; PfqJy: return $dHcaF($gSoa2); goto cfg5k; cfg5k: } }