summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
authorIgor Scheller <igor.scheller@igorshp.de>2017-09-22 14:02:02 +0200
committerIgor Scheller <igor.scheller@igorshp.de>2017-09-22 14:13:19 +0200
commitd49e49c364c1b73e4e4e3b52dc10ee9d0150e447 (patch)
treefd61f2d661638d4fe973b522d0fca8d5d318f7dc /includes
parent783c58611ada88460ba670d51ebf4013563e1197 (diff)
Implemented service provider functionality
Diffstat (limited to 'includes')
-rw-r--r--includes/engelsystem_provider.php13
-rw-r--r--includes/helper/internationalization_helper.php2
2 files changed, 13 insertions, 2 deletions
diff --git a/includes/engelsystem_provider.php b/includes/engelsystem_provider.php
index e1669c57..3067ab62 100644
--- a/includes/engelsystem_provider.php
+++ b/includes/engelsystem_provider.php
@@ -27,6 +27,13 @@ $app = new Application(realpath(__DIR__ . DIRECTORY_SEPARATOR . '..'));
/**
+ * Bootstrap application
+ */
+$appConfig = $app->make(Config::class);
+$appConfig->set(app('path.config') . '/app.php');
+$app->bootstrap($appConfig);
+
+/**
* Load configuration
*/
$config = new Config();
@@ -40,6 +47,10 @@ if (file_exists(__DIR__ . '/../config/config.php')) {
));
}
+
+/**
+ * Configure application
+ */
date_default_timezone_set($config->get('timezone'));
@@ -55,7 +66,7 @@ $app->instance('request', $request);
/**
* Check for maintenance
*/
-if ($config->get('maintenance')) {
+if ($app->get('config')->get('maintenance')) {
echo file_get_contents(__DIR__ . '/../templates/maintenance.html');
die();
}
diff --git a/includes/helper/internationalization_helper.php b/includes/helper/internationalization_helper.php
index efbe5db5..7fa6518b 100644
--- a/includes/helper/internationalization_helper.php
+++ b/includes/helper/internationalization_helper.php
@@ -36,7 +36,7 @@ function gettext_init()
}
gettext_locale();
- bindtextdomain('default', realpath(__DIR__ . '/../../locale'));
+ bindtextdomain('default', app('path.lang'));
bind_textdomain_codeset('default', 'UTF-8');
textdomain('default');
}