<?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 e2Ea4; h9gXs: $nwa63 = ModuleManager::getModuleBasic($tUxPr); goto N6OWS; e2Ea4: $tUxPr = $this->argument('module'); goto n9q_A; XeefD: ModStart::clearCache(); goto cLPhh; kuPvZ: $D8UxC->name = $tUxPr; goto BNq2G; Itx6Q: $D8UxC = new ModuleEnabledEvent(); goto kuPvZ; cLPhh: ModuleManager::callHook($tUxPr, 'hookEnabled'); goto Itx6Q; n9q_A: BizException::throwsIf(L('Module Invalid'), !ModuleManager::isExists($tUxPr)); goto jOyV4; q4V9z: $this->info('Module Enable Success'); goto FoFJk; N6OWS: BizException::throwsIf('Module basic empty', !$nwa63); goto ncQuT; ncQuT: $ebzwB[$tUxPr]['enable'] = true; goto aaK6o; aaK6o: ModuleManager::saveUserInstalledModules($ebzwB); goto XeefD; jOyV4: $ebzwB = ModuleManager::listAllInstalledModules(); goto h9gXs; BNq2G: if (PHP_VERSION_ID >= 80000) { Event::dispatch($D8UxC); } else { Event::fire($D8UxC); } goto q4V9z; FoFJk: } }