1
0
mirror of https://github.com/flarum/core.git synced 2025-10-13 16:05:05 +02:00
Files
php-flarum/src/Core.php
2015-08-26 16:56:32 +09:30

34 lines
714 B
PHP

<?php
/*
* This file is part of Flarum.
*
* (c) Toby Zerner <toby.zerner@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Flarum;
class Core
{
public static function isInstalled()
{
return app()->bound('flarum.config');
}
public static function inDebugMode()
{
return static::isInstalled() && app('flarum.config')['debug'];
}
public static function config($key, $default = null)
{
if (! static::isInstalled()) {
return $default;
}
return app('Flarum\Core\Settings\SettingsRepository')->get($key, $default);
}
}