mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-31 01:34:09 +02:00
bootstrapping: only web should depend on forms
This fixes the problem that CLI scripts or other applications without an application directory would badly fail because of missing web forms. refs #6411
This commit is contained in:
parent
76a9e67e35
commit
602b448505
@ -301,7 +301,6 @@ abstract class ApplicationBootstrap
|
|||||||
|
|
||||||
$this->loader = new Loader();
|
$this->loader = new Loader();
|
||||||
$this->loader->registerNamespace('Icinga', $this->libDir. '/Icinga');
|
$this->loader->registerNamespace('Icinga', $this->libDir. '/Icinga');
|
||||||
$this->loader->registerNamespace('Icinga\\Form', $this->appDir. '/forms');
|
|
||||||
$this->loader->register();
|
$this->loader->register();
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
|
@ -124,6 +124,7 @@ class Web extends ApplicationBootstrap
|
|||||||
->setupInternationalization()
|
->setupInternationalization()
|
||||||
->setupRequest()
|
->setupRequest()
|
||||||
->setupZendMvc()
|
->setupZendMvc()
|
||||||
|
->setupFormNamespace()
|
||||||
->setupModuleManager()
|
->setupModuleManager()
|
||||||
->loadEnabledModules()
|
->loadEnabledModules()
|
||||||
->setupRoute()
|
->setupRoute()
|
||||||
@ -359,5 +360,19 @@ class Web extends ApplicationBootstrap
|
|||||||
}
|
}
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Setup an autoloader namespace for Icinga\Form
|
||||||
|
*
|
||||||
|
* @return self
|
||||||
|
*/
|
||||||
|
private function setupFormNamespace()
|
||||||
|
{
|
||||||
|
$this->getLoader()->registerNamespace(
|
||||||
|
'Icinga\\Form',
|
||||||
|
$this->getApplicationDir('forms')
|
||||||
|
);
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// @codeCoverageIgnoreEnd
|
// @codeCoverageIgnoreEnd
|
||||||
|
Loading…
x
Reference in New Issue
Block a user