Allow customization of controller namespace #282
This commit is contained in:
@ -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');
|
||||
}
|
||||
|
||||
|
||||
@ -145,6 +145,14 @@ class Module extends BaseModule
|
||||
* to compute the hash doubles for every increment by one of $cost
|
||||
*/
|
||||
public $blowfishCost = 10;
|
||||
/**
|
||||
* @var string Web controller namespace
|
||||
*/
|
||||
public $controllerNamespace = 'Da\User\Controller';
|
||||
/**
|
||||
* @var string Console controller namespace
|
||||
*/
|
||||
public $consoleControllerNamespace = 'Da\User\Command';
|
||||
/**
|
||||
* @var array the class map. How the container should load specific classes
|
||||
* @see Bootstrap::buildClassMap() for more details
|
||||
|
||||
Reference in New Issue
Block a user