Initial project structure with Slim skeleton
This commit is contained in:
26
app/settings.php
Normal file
26
app/settings.php
Normal file
@ -0,0 +1,26 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
use App\Application\Settings\Settings;
|
||||
use App\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,
|
||||
],
|
||||
]);
|
||||
}
|
||||
]);
|
||||
};
|
Reference in New Issue
Block a user