예제 #1
0
 /**
  * Registers a mapping between the given PHP namespace and the module's view templates base directory that will be
  * used for resolving view template paths to PHP controller classes.
  *
  * @param ModuleInfo $moduleInfo
  * @param string     $namespace
  * @param string     $basePath [optional] A base path for mapping, relative to the module's view templates directory.
  * @return $this
  */
 function registerControllersNamespace(ModuleInfo $moduleInfo, $namespace, $basePath = '')
 {
     if ($basePath) {
         $basePath = "/{$basePath}";
     }
     $this->controllerNamespaces["{$moduleInfo->path}/{$this->viewEngineSettings->moduleViewsPath()}{$basePath}"] = $namespace;
     return $this;
 }