<?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 Z2dNx; rFZaF: ModuleManager::callHook($oXHYw, 'hookEnabled'); goto MQuKv; eq1Xm: $lfQtk[$oXHYw]['enable'] = true; goto bU115; bU115: ModuleManager::saveUserInstalledModules($lfQtk); goto fT60B; X9k7j: $this->info('Module Enable Success'); goto moMeJ; KT3yb: if (PHP_VERSION_ID >= 80000) { Event::dispatch($zU3b7); } else { Event::fire($zU3b7); } goto X9k7j; YYMn4: BizException::throwsIf(L('Module Invalid'), !ModuleManager::isExists($oXHYw)); goto OWn7q; f5s3K: BizException::throwsIf('Module basic empty', !$K0286); goto eq1Xm; Z2dNx: $oXHYw = $this->argument('module'); goto YYMn4; w9TEn: $zU3b7->name = $oXHYw; goto KT3yb; K2e7k: $K0286 = ModuleManager::getModuleBasic($oXHYw); goto f5s3K; MQuKv: $zU3b7 = new ModuleEnabledEvent(); goto w9TEn; OWn7q: $lfQtk = ModuleManager::listAllInstalledModules(); goto K2e7k; fT60B: ModStart::clearCache(); goto rFZaF; moMeJ: } }