Übernahme des Slim-Skelekton.

This commit is contained in:
2021-03-25 13:52:30 +01:00
parent 78b34514f9
commit d4c10db933
38 changed files with 1479 additions and 0 deletions
+26
View File
@@ -0,0 +1,26 @@
<?php
declare(strict_types=1);
use TorstenHettstedt\TimekeepingApi\Application\Settings\Settings;
use TorstenHettstedt\TimekeepingApi\Application\Settings\SettingsInterface;
use DI\ContainerBuilder;
use Monolog\Logger;
return function (ContainerBuilder $containerBuilder) {
// Global Settings Object
$containerBuilder->addDefinitions([
SettingsInterface::class => function () {
return new Settings([
'displayErrorDetails' => true, // Should be set to false in production
'logError' => false,
'logErrorDetails' => false,
'logger' => [
'name' => 'slim-app',
'path' => isset($_ENV['docker']) ? 'php://stdout' : __DIR__ . '/../logs/app.log',
'level' => Logger::DEBUG,
],
]);
}
]);
};