Allow customization of controller namespace #282

This commit is contained in:
Lorenzo Milesi
2018-10-24 08:06:38 +02:00
parent 5ef46729d0
commit 07699f4197
4 changed files with 19 additions and 2 deletions

View File

@ -281,7 +281,7 @@ class Bootstrap implements BootstrapInterface
*/
protected function initConsoleCommands(ConsoleApplication $app)
{
$app->getModule('user')->controllerNamespace = 'Da\User\Command';
$app->getModule('user')->controllerNamespace = $app->getModule('user')->consoleControllerNamespace;
}
/**
@ -291,7 +291,7 @@ class Bootstrap implements BootstrapInterface
*/
protected function initControllerNamespace(WebApplication $app)
{
$app->getModule('user')->controllerNamespace = 'Da\User\Controller';
$app->getModule('user')->controllerNamespace = $app->getModule('user')->controllerNamespace;
$app->getModule('user')->setViewPath('@Da/User/resources/views');
}