Register the controller namespace

refs #5786
This commit is contained in:
Eric Lippmann 2015-08-17 13:31:26 +02:00
parent 965fee1e9e
commit 1e1d4531c6
1 changed files with 13 additions and 7 deletions

View File

@ -89,7 +89,7 @@ class Web extends EmbeddedWeb
->setupLogger()
->setupInternationalization()
->setupZendMvc()
->setupFormNamespace()
->setupNamespaces()
->setupModuleManager()
->setupUserBackendFactory()
->loadSetupModuleIfNecessary()
@ -298,16 +298,22 @@ class Web extends EmbeddedWeb
}
/**
* Setup an autoloader namespace for Icinga\Forms
* Setup auto loader namespaces for Icinga\Controllers and Icinga\Forms
*
* @return $this
*/
private function setupFormNamespace()
private function setupNamespaces()
{
$this->getLoader()->registerNamespace(
'Icinga\\Forms',
$this->getApplicationDir('forms')
);
$this
->getLoader()
->registerNamespace(
'Icinga\\Controllers',
$this->getApplicationDir('controllers')
)
->registerNamespace(
'Icinga\\Forms',
$this->getApplicationDir('forms')
);
return $this;
}
}