示例#1
0
 /**
  * Run module based on current route
  *
  * @return Module
  */
 protected function runModule()
 {
     $moduleName = $this->getRoute()->getModule();
     $module = $this->app->getModule($moduleName);
     $module->run();
     return $module;
 }
示例#2
0
文件: Lite.php 项目: appcia/webwork
 /**
  * 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;
 }
示例#3
0
文件: View.php 项目: appcia/webwork
 /**
  * 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;
 }