Web: Use our own dispatcher

refs #5786
This commit is contained in:
Eric Lippmann 2014-12-18 17:12:11 +01:00
parent 9647293f1b
commit fdd06697b3

View File

@ -12,6 +12,7 @@ use Icinga\Exception\ConfigurationError;
use Icinga\Exception\NotReadableError;
use Icinga\Application\Logger;
use Icinga\Util\TimezoneDetect;
use Icinga\Web\Controller\Dispatcher;
use Icinga\Web\Request;
use Icinga\Web\Response;
use Icinga\Web\View;
@ -232,6 +233,8 @@ class Web extends ApplicationBootstrap
{
$this->frontController = Zend_Controller_Front::getInstance();
$this->frontController->setDispatcher(new Dispatcher());
$this->frontController->setRequest($this->request);
$this->frontController->setControllerDirectory($this->getApplicationDir('/controllers'));
@ -335,6 +338,10 @@ class Web extends ApplicationBootstrap
'Icinga\\Forms',
$this->getApplicationDir('forms')
);
$this->getLoader()->registerNamespace(
'Icinga\\Controllers',
$this->getApplicationDir('controllers')
);
return $this;
}
}