<?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 HVOnI; sfloW: $gm6dM = ModuleManager::getModuleBasic($h8H9D); goto NIFRw; HVOnI: $h8H9D = $this->argument('module'); goto QbGLI; yAtvh: ModuleManager::saveUserInstalledModules($acEAc); goto aSANN; H9H65: $this->info('Module Enable Success'); goto UNcNF; FVmx5: $aHEo6 = new ModuleEnabledEvent(); goto U0H0j; QbGLI: BizException::throwsIf(L('Module Invalid'), !ModuleManager::isExists($h8H9D)); goto oCXt2; aSANN: ModStart::clearCache(); goto EXYOY; oCXt2: $acEAc = ModuleManager::listAllInstalledModules(); goto sfloW; EXYOY: ModuleManager::callHook($h8H9D, 'hookEnabled'); goto FVmx5; U0H0j: $aHEo6->name = $h8H9D; goto lh2Ta; lh2Ta: if (PHP_VERSION_ID >= 80000) { Event::dispatch($aHEo6); } else { Event::fire($aHEo6); } goto H9H65; NIFRw: BizException::throwsIf('Module basic empty', !$gm6dM); goto jDQmW; jDQmW: $acEAc[$h8H9D]['enable'] = true; goto yAtvh; UNcNF: } }