refactor: New Video class

The news class provides a cleaner object-oriented logic

BREAKING CHANGE: The VideoDownload class has been removed and the Config constructor is now private
This commit is contained in:
Pierre Rudloff 2019-04-21 18:30:02 +02:00
parent feb8998188
commit 4c9af8ad1d
18 changed files with 665 additions and 719 deletions

View file

@ -14,6 +14,10 @@ if (isset($_SERVER['REQUEST_URI']) && strpos($_SERVER['REQUEST_URI'], '/index.ph
die;
}
if (is_file(__DIR__.'/config/config.yml')) {
Config::setFile(__DIR__.'/config/config.yml');
}
$app = new App();
$container = $app->getContainer();
$config = Config::getInstance();
@ -28,7 +32,7 @@ if (!class_exists('Locale')) {
$container['locale'] = new LocaleManager($_COOKIE);
$app->add(new LocaleMiddleware($container));
$controller = new FrontController($container, null, $_COOKIE);
$controller = new FrontController($container, $_COOKIE);
$container['errorHandler'] = [$controller, 'error'];