Files
michaelschiemer/src/Framework/Config/AppConfig.php
Michael Schiemer 70e45fb56e fix(Discovery): Add comprehensive debug logging for router initialization
- Add initializer count logging in DiscoveryServiceBootstrapper
- Add route structure analysis in RouterSetup
- Add request parameter logging in HttpRouter
- Update PHP production config for better OPcache handling
- Fix various config and error handling improvements
2025-10-27 22:23:18 +01:00

53 lines
1.2 KiB
PHP

<?php
declare(strict_types=1);
namespace App\Framework\Config;
use App\Framework\Core\ValueObjects\Version;
use App\Framework\DateTime\Timezone;
final readonly class AppConfig
{
public function __construct(
public string $name = 'Framework App',
public Version $version = new Version(1, 0, 0),
public string $environment = 'production',
public bool $debug = false,
public Timezone $timezone = Timezone::EuropeBerlin,
public string $locale = 'en',
public EnvironmentType $type = EnvironmentType::DEV
) {
}
public function isProduction(): bool
{
return $this->type->isProduction();
}
public function isDevelopment(): bool
{
return $this->type->isDevelopment();
}
public function isStaging(): bool
{
return $this->type->isStaging();
}
public function isProductionLike(): bool
{
return $this->type->isProductionLike();
}
public function isDebugEnabled(): bool
{
return $this->debug || $this->type->isDebugEnabled();
}
public function isDebug(): bool
{
return $this->isDebugEnabled();
}
}