protected function _uninstallModule($module_name) { $this->cliEcho("Uninstall module\n", 'green', 'bold'); try { if (!$module_name || !file_exists(THEBUGGENIE_MODULES_PATH . $module_name . DS . 'module')) { throw new Exception("Please provide a valid module name"); } elseif (!TBGContext::isModuleLoaded($module_name)) { throw new Exception("This module is not installed"); } else { $this->cliEcho("Removing {$module_name} ..."); TBGContext::getModule($module_name)->uninstall(); $this->cliEcho(' ok!', 'green', 'bold'); $this->cliEcho("\n"); } } catch (Exception $e) { $this->cliEcho($e->getMessage() . "\n", 'red'); } }