Exemplo n.º 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;
 }
Exemplo n.º 2
0
 /**
  * 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;
 }
Exemplo n.º 3
0
 /**
  * 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;
 }