<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace ModStart\Command; use Illuminate\Console\Command; use Illuminate\Support\Facades\Event; use ModStart\Core\Events\ModuleDisabledEvent; use ModStart\Core\Exception\BizException; use ModStart\ModStart; use ModStart\Module\ModuleManager; class ModuleDisableCommand extends Command { protected $signature = 'modstart:module-disable {module}'; public function handle() { goto gzWDf; sNCuv: $zU3b7 = new ModuleDisabledEvent(); goto Wt1GM; gzWDf: $oXHYw = $this->argument('module'); goto vs43m; FYbsW: if (PHP_VERSION_ID >= 80000) { Event::dispatch($zU3b7); } else { Event::fire($zU3b7); } goto GpVjH; AX1m0: ModuleManager::saveUserInstalledModules($lfQtk); goto ZKvtc; ty1dM: $K0286 = ModuleManager::getModuleBasic($oXHYw); goto DLFJK; pp7yN: $lfQtk = ModuleManager::listAllInstalledModules(); goto ty1dM; GpVjH: $this->info('Module Disable Success'); goto fAA_N; ZKvtc: ModStart::clearCache(); goto sNCuv; JTtFS: $lfQtk[$oXHYw]['enable'] = false; goto AX1m0; Wt1GM: $zU3b7->name = $oXHYw; goto FYbsW; vs43m: BizException::throwsIf(L('Module Invalid'), !ModuleManager::isExists($oXHYw)); goto pp7yN; W0rXa: ModuleManager::callHook($oXHYw, 'hookBeforeDisable'); goto JTtFS; DLFJK: BizException::throwsIf('Module basic empty', !$K0286); goto W0rXa; fAA_N: } }