<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace ModStart\Command; use Illuminate\Console\Command; use Illuminate\Support\Facades\Event; use ModStart\Core\Events\ModuleEnabledEvent; use ModStart\Core\Exception\BizException; use ModStart\ModStart; use ModStart\Module\ModuleManager; class ModuleEnableCommand extends Command { protected $signature = 'modstart:module-enable {module}'; public function handle() { goto wfSRR; tY9du: $fPCm9->name = $CiBrR; goto TPtd4; wmEyA: $uDm81[$CiBrR]['enable'] = true; goto ceFGb; wfSRR: $CiBrR = $this->argument('module'); goto Y_jix; Y_jix: BizException::throwsIf(L('Module Invalid'), !ModuleManager::isExists($CiBrR)); goto nWgEW; JLjv2: $fPCm9 = new ModuleEnabledEvent(); goto tY9du; nWgEW: $uDm81 = ModuleManager::listAllInstalledModules(); goto GihMT; H7Gnc: BizException::throwsIf('Module basic empty', !$LJ5W3); goto wmEyA; X5TnB: $this->info('Module Enable Success'); goto Nx87j; ceFGb: ModuleManager::saveUserInstalledModules($uDm81); goto fTAYo; fTAYo: ModStart::clearCache(); goto zkJ4Y; zkJ4Y: ModuleManager::callHook($CiBrR, 'hookEnabled'); goto JLjv2; GihMT: $LJ5W3 = ModuleManager::getModuleBasic($CiBrR); goto H7Gnc; TPtd4: if (PHP_VERSION_ID >= 80000) { Event::dispatch($fPCm9); } else { Event::fire($fPCm9); } goto X5TnB; Nx87j: } }