mail-account-admin/src/Settings.php

32 lines
749 B
PHP
Raw Normal View History

<?php
declare(strict_types=1);
namespace MailAccountAdmin;
class Settings
{
public function isDebugMode(): bool
{
return getenv('APP_DEBUG') === 'true';
}
public function getTwigSettings(): array
{
return [
'cache' => getenv('TWIG_CACHE_DIR') ?: false,
'strict_variables' => getenv('TWIG_STRICT') === 'true',
];
}
public function getDatabaseSettings(): array
{
return [
'host' => getenv('DB_HOST') ?: 'localhost',
'port' => getenv('DB_PORT') ?: 3306,
'dbname' => getenv('DB_DATABASE') ?: '',
'username' => getenv('DB_USERNAME') ?: '',
'password' => getenv('DB_PASSWORD') ?: '',
];
}
}