2013-06-07 11:44:37 +02:00
|
|
|
<?php
|
2013-07-26 15:58:16 +02:00
|
|
|
// {{{ICINGA_LICENSE_HEADER}}}
|
|
|
|
// {{{ICINGA_LICENSE_HEADER}}}
|
|
|
|
|
2013-06-07 11:44:37 +02:00
|
|
|
namespace Icinga\Application;
|
|
|
|
|
|
|
|
require_once dirname(__FILE__) . '/ApplicationBootstrap.php';
|
2013-07-26 15:58:16 +02:00
|
|
|
|
2013-06-07 11:44:37 +02:00
|
|
|
use Icinga\Exception\ProgrammingError;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Use this if you want to make use of Icinga funtionality in other web projects
|
|
|
|
*
|
|
|
|
* Usage example:
|
|
|
|
* <code>
|
|
|
|
* use Icinga\Application\EmbeddedWeb;
|
|
|
|
* EmbeddedWeb::start();
|
|
|
|
* </code>
|
|
|
|
*/
|
|
|
|
class EmbeddedWeb extends ApplicationBootstrap
|
|
|
|
{
|
2013-07-26 15:58:16 +02:00
|
|
|
/**
|
|
|
|
* Embedded bootstrap parts
|
|
|
|
*
|
|
|
|
* @see ApplicationBootstrap::bootstrap
|
|
|
|
* @return self
|
|
|
|
*/
|
2013-06-07 11:44:37 +02:00
|
|
|
protected function bootstrap()
|
|
|
|
{
|
2014-03-04 11:14:00 +01:00
|
|
|
return $this->loadConfig()
|
2013-07-26 15:58:16 +02:00
|
|
|
->setupErrorHandling()
|
|
|
|
->setupTimezone()
|
2014-02-14 14:22:15 +01:00
|
|
|
->setupModuleManager()
|
|
|
|
->loadEnabledModules();
|
2013-06-07 11:44:37 +02:00
|
|
|
}
|
|
|
|
}
|