<?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 Lf2iO; BlYLC: BizException::throwsIf(L('Module Invalid'), !ModuleManager::isExists($vbusR)); goto u14il; pIpQT: $DI_6G = ModuleManager::getModuleBasic($vbusR); goto pC0d1; pC0d1: BizException::throwsIf('Module basic empty', !$DI_6G); goto gYdsD; u14il: $Wnbq_ = ModuleManager::listAllInstalledModules(); goto pIpQT; Lf2iO: $vbusR = $this->argument('module'); goto BlYLC; p2yrQ: ModuleManager::saveUserInstalledModules($Wnbq_); goto STyqz; gYdsD: ModuleManager::callHook($vbusR, 'hookBeforeDisable'); goto YH1gj; STyqz: ModStart::clearCache(); goto Tsu1I; w8cMS: $this->info('Module Disable Success'); goto A4qgr; tY03L: if (PHP_VERSION_ID >= 80000) { Event::dispatch($f5o2n); } else { Event::fire($f5o2n); } goto w8cMS; Tsu1I: $f5o2n = new ModuleDisabledEvent(); goto Bokcw; Bokcw: $f5o2n->name = $vbusR; goto tY03L; YH1gj: $Wnbq_[$vbusR]['enable'] = false; goto p2yrQ; A4qgr: } }