/** * Run module based on current route * * @return Module */ protected function runModule() { $moduleName = $this->getRoute()->getModule(); $module = $this->app->getModule($moduleName); $module->run(); return $module; }
/** * Get service or parameter from DI container * * @param string $key Service or parameter key * * @return mixed */ public function get($key) { $service = $this->app->get($key); return $service; }
/** * Get path for views in specified module * If not specified, path is for current module * * @param null $module * * @return string */ public function getModulePath($module = null) { $dispatcher = $this->app->getDispatcher(); $path = $dispatcher->getModulePath($module) . '/view'; return $path; }