2013-06-07 11:44:37 +02:00
|
|
|
<?php
|
2015-02-03 16:27:59 +01:00
|
|
|
/* Icinga Web 2 | (c) 2013-2015 Icinga Development Team | http://www.gnu.org/licenses/gpl-2.0.txt */
|
2013-07-26 15:58:16 +02:00
|
|
|
|
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
|
|
|
/**
|
2014-12-10 09:31:37 +01:00
|
|
|
* Use this if you want to make use of Icinga functionality in other web projects
|
2013-06-07 11:44:37 +02:00
|
|
|
*
|
|
|
|
* 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-11-14 14:07:13 +01:00
|
|
|
return $this
|
|
|
|
->setupZendAutoloader()
|
|
|
|
->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
|
|
|
}
|
|
|
|
}
|