2016-04-12 14:39:18 +02:00
|
|
|
<?php
|
2019-09-04 20:40:41 +02:00
|
|
|
|
2020-02-21 09:40:34 +01:00
|
|
|
use Laminas\Mvc\Application;
|
2019-09-04 20:40:41 +02:00
|
|
|
|
2016-04-12 14:39:18 +02:00
|
|
|
chdir(dirname(__DIR__));
|
|
|
|
|
|
|
|
// Decline static file requests back to the PHP built-in webserver
|
2019-09-04 20:40:41 +02:00
|
|
|
if (php_sapi_name() === 'cli-server') {
|
|
|
|
$path = realpath(__DIR__ . parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH));
|
|
|
|
if (__FILE__ !== $path && is_file($path)) {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
unset($path);
|
2016-04-12 14:39:18 +02:00
|
|
|
}
|
|
|
|
|
2016-06-02 15:12:27 +02:00
|
|
|
if(date_default_timezone_get() != ini_get('date.timezone')){
|
|
|
|
date_default_timezone_set('Europe/Luxembourg');
|
|
|
|
}
|
2016-04-20 14:26:50 +02:00
|
|
|
|
2019-09-12 14:38:30 +02:00
|
|
|
require 'vendor/autoload.php';
|
2019-09-04 20:40:41 +02:00
|
|
|
|
|
|
|
if (! class_exists(Application::class)) {
|
|
|
|
throw new RuntimeException(
|
|
|
|
"Unable to load application.\n"
|
|
|
|
. "- Type `composer install` if you are developing locally.\n"
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
$appConfig = require 'config/application.config.php';
|
|
|
|
if (file_exists('config/development.config.php')) {
|
2020-02-21 09:40:34 +01:00
|
|
|
$appConfig = Laminas\Stdlib\ArrayUtils::merge($appConfig, include 'config/development.config.php');
|
2019-09-04 20:40:41 +02:00
|
|
|
}
|
2016-04-12 14:39:18 +02:00
|
|
|
|
2019-09-04 20:40:41 +02:00
|
|
|
Application::init($appConfig)->run();
|