Jannis Moßhammer 54ccb9b12a Move libraries from incubator to working tree for evaluation
Add all untested files from incubator's library/Icinga to working
tree library/Icinga

refs #4257
2013-06-07 15:46:33 +02:00

27 lines
507 B
PHP

<?php
namespace Icinga\Application;
use Icinga\Exception\ProgrammingError;
class Icinga
{
protected static $app;
public static function app()
{
if (null === self::$app) {
throw new ProgrammingError('Icinga has never been started');
}
return self::$app;
}
public static function setApp($app)
{
if (null !== self::$app) {
throw new ProgrammingError('Cannot start Icinga twice');
}
self::$app = $app;
}
}