Module/Autoloader: Register Icinga\Module\<module> namespace

refs #4586
This commit is contained in:
Eric Lippmann 2013-08-20 15:04:50 +02:00 committed by Jannis Moßhammer
parent 67fcb09a89
commit 03f081ce33
1 changed files with 2 additions and 2 deletions

View File

@ -272,9 +272,9 @@ class Module
$moduleName = ucfirst($this->getName()); $moduleName = ucfirst($this->getName());
$moduleLibraryDir = $this->getLibDir(). '/'. $moduleName; $moduleLibraryDir = $this->getLibDir(). '/'. $moduleName;
$this->app->getLoader()->registerNamespace($moduleName, $moduleLibraryDir); $this->app->getLoader()->registerNamespace('Icinga\\Module\\' . $moduleName, $moduleLibraryDir);
if (is_dir($this->getFormDir())) { if (is_dir($this->getFormDir())) {
$this->app->getLoader()->registerNamespace($moduleName. '\\Form', $this->getFormDir()); $this->app->getLoader()->registerNamespace('Icinga\\Module\\' . $moduleName. '\\Form', $this->getFormDir());
} }
} }