<?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 ir_r7; vlE6q: $D8UxC->name = $tUxPr; goto hKXrt; b2HsF: BizException::throwsIf('Module basic empty', !$nwa63); goto TBX9M; xCo1u: ModuleManager::saveUserInstalledModules($ebzwB); goto c7M4J; ir_r7: $tUxPr = $this->argument('module'); goto IeM5z; d3vVw: $nwa63 = ModuleManager::getModuleBasic($tUxPr); goto b2HsF; zEB6A: $ebzwB = ModuleManager::listAllInstalledModules(); goto d3vVw; hO3Jz: $ebzwB[$tUxPr]['enable'] = false; goto xCo1u; h9kcX: $this->info('Module Disable Success'); goto tw8yZ; TBX9M: ModuleManager::callHook($tUxPr, 'hookBeforeDisable'); goto hO3Jz; c7M4J: ModStart::clearCache(); goto zAhNp; hKXrt: if (PHP_VERSION_ID >= 80000) { Event::dispatch($D8UxC); } else { Event::fire($D8UxC); } goto h9kcX; IeM5z: BizException::throwsIf(L('Module Invalid'), !ModuleManager::isExists($tUxPr)); goto zEB6A; zAhNp: $D8UxC = new ModuleDisabledEvent(); goto vlE6q; tw8yZ: } }