<?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 ELkd3; ELkd3: $GVDx3 = $this->argument('module'); goto CVHAi; HTB5p: ModuleManager::callHook($GVDx3, 'hookBeforeDisable'); goto SsklE; Cn49y: $ENyP_ = ModuleManager::listAllInstalledModules(); goto HIbyp; GtnYG: ModuleManager::saveUserInstalledModules($ENyP_); goto gW5ZW; SsklE: $ENyP_[$GVDx3]['enable'] = false; goto GtnYG; CVHAi: BizException::throwsIf(L('Module Invalid'), !ModuleManager::isExists($GVDx3)); goto Cn49y; ZlqQs: $lefmL->name = $GVDx3; goto LG7ZD; HIbyp: $KALZg = ModuleManager::getModuleBasic($GVDx3); goto idfqc; idfqc: BizException::throwsIf('Module basic empty', !$KALZg); goto HTB5p; gW5ZW: ModStart::clearCache(); goto Si7N4; sLfJr: $this->info('Module Disable Success'); goto eXwks; Si7N4: $lefmL = new ModuleDisabledEvent(); goto ZlqQs; LG7ZD: if (PHP_VERSION_ID >= 80000) { Event::dispatch($lefmL); } else { Event::fire($lefmL); } goto sLfJr; eXwks: } }