/** * @param $module * @return bool */ public function bootstrapModule($module) { $config = Config::get('module'); $modulePath = $config['module.path'] . DS; $moduleConfigDir = $config['module.config'] . DS; $class = '\\' . APP_NS . '\\' . $this->getModuleDir() . '\\' . ucfirst($module) . '\\BootStrap'; $file = $modulePath . ucfirst($module) . DS . $moduleConfigDir . strtolower($module) . EXT; if (!file_exists($file)) { return false; } Config::setConfigurationItems(strtolower($module) . '.config', include $file); return (new $class())->register($this->getApplication(), $file); }