summaryrefslogtreecommitdiff
path: root/includes/engelsystem.php
diff options
context:
space:
mode:
authorIgor Scheller <igor.scheller@igorshp.de>2018-08-20 20:58:51 +0200
committerIgor Scheller <igor.scheller@igorshp.de>2018-08-20 21:07:57 +0200
commitd6c8f1a61475fefa9594141aaf12a28d220bdaf8 (patch)
tree905051fdb1307f947c3a3a7be240609f8bc00e59 /includes/engelsystem.php
parentbf6efe532c8f2de84e95b090911280a9b1b61ce8 (diff)
parent2f41b9e4418def9b69cf237312bc592364585025 (diff)
Merge branch 'master' to 'rebuild-database'
Diffstat (limited to 'includes/engelsystem.php')
-rw-r--r--includes/engelsystem.php34
1 files changed, 2 insertions, 32 deletions
diff --git a/includes/engelsystem.php b/includes/engelsystem.php
index 07abbb42..f7d813c5 100644
--- a/includes/engelsystem.php
+++ b/includes/engelsystem.php
@@ -1,14 +1,9 @@
<?php
-use Engelsystem\Application;
-use Engelsystem\Config\Config;
-use Engelsystem\Exceptions\Handler;
-use Engelsystem\Exceptions\Handlers\HandlerInterface;
-
/**
- * This file includes all needed functions, connects to the db etc.
+ * Bootstrap application
*/
-require_once __DIR__ . '/autoload.php';
+require __DIR__ . '/application.php';
/**
@@ -18,31 +13,6 @@ require __DIR__ . '/includes.php';
/**
- * Initialize and bootstrap the application
- */
-$app = new Application(realpath(__DIR__ . DIRECTORY_SEPARATOR . '..'));
-$appConfig = $app->make(Config::class);
-$appConfig->set(require config_path('app.php'));
-$app->bootstrap($appConfig);
-
-
-/**
- * Configure application
- */
-date_default_timezone_set($app->get('config')->get('timezone'));
-
-if (config('environment') == 'development') {
- $errorHandler = $app->get('error.handler');
- $errorHandler->setEnvironment(Handler::ENV_DEVELOPMENT);
- $app->bind(HandlerInterface::class, 'error.handler.development');
- ini_set('display_errors', true);
- error_reporting(E_ALL);
-} else {
- ini_set('display_errors', false);
-}
-
-
-/**
* Check for maintenance
*/
if ($app->get('config')->get('maintenance')) {