<?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 zOnGJ; y0v_r: if (PHP_VERSION_ID >= 80000) { Event::dispatch($h_uF5); } else { Event::fire($h_uF5); } goto dgxQJ; ExC6t: BizException::throwsIf('Module basic empty', !$jD2Nx); goto XAY5X; Sv8yM: ModuleManager::callHook($uacrl, 'hookEnabled'); goto uJlGz; vWTTy: $qaXyg = ModuleManager::listAllInstalledModules(); goto CaQLQ; dgxQJ: $this->info('Module Enable Success'); goto iMlAX; QdjX1: $h_uF5->name = $uacrl; goto y0v_r; BLjh0: ModuleManager::saveUserInstalledModules($qaXyg); goto MplyT; CaQLQ: $jD2Nx = ModuleManager::getModuleBasic($uacrl); goto ExC6t; XAY5X: $qaXyg[$uacrl]['enable'] = true; goto BLjh0; MplyT: ModStart::clearCache(); goto Sv8yM; uJlGz: $h_uF5 = new ModuleEnabledEvent(); goto QdjX1; VFttZ: BizException::throwsIf(L('Module Invalid'), !ModuleManager::isExists($uacrl)); goto vWTTy; zOnGJ: $uacrl = $this->argument('module'); goto VFttZ; iMlAX: } }