/** * Parse cur module * * @param \App $app */ public function __construct($app) { $this->app = $app; $this->moduleName = get_class($this); $this->path = Router::getLoadedClassPath($this->moduleName); $this->info = $this->getInfo(); $this->config = Config::module($this->moduleName, !empty($this->info['systemConfig'])); $that = $this; Inji::$inst->listen('Config-change-module-' . $this->app->name . '-' . $this->moduleName, $this->app->name . '-' . $this->moduleName . 'config', function ($event) use($that) { $that->config = $event['eventObject']; return $event['eventObject']; }); }