<?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 fXkE3; kUa1M: $jV_Lj->name = $JHuzz; goto HRS00; JiNr6: $ALWFZ = ModuleManager::listAllInstalledModules(); goto QN7zf; V0Xcu: $ALWFZ[$JHuzz]['enable'] = true; goto HMktF; atjkE: ModStart::clearCache(); goto nPjo8; vHetY: $jV_Lj = new ModuleEnabledEvent(); goto kUa1M; eG2to: $this->info('Module Enable Success'); goto msBDW; HMktF: ModuleManager::saveUserInstalledModules($ALWFZ); goto atjkE; BSBlc: BizException::throwsIf(L('Module Invalid'), !ModuleManager::isExists($JHuzz)); goto JiNr6; QN7zf: $Pyx_m = ModuleManager::getModuleBasic($JHuzz); goto guhDy; fXkE3: $JHuzz = $this->argument('module'); goto BSBlc; HRS00: if (PHP_VERSION_ID >= 80000) { Event::dispatch($jV_Lj); } else { Event::fire($jV_Lj); } goto eG2to; guhDy: BizException::throwsIf('Module basic empty', !$Pyx_m); goto V0Xcu; nPjo8: ModuleManager::callHook($JHuzz, 'hookEnabled'); goto vHetY; msBDW: } }