get('TEMPLATE_DRIVER', $config->get('app.drivers.template', 'eyrie')); $impl = match ($driver) { 'eyrie' => \Phred\Template\EyrieRenderer::class, default => throw new \RuntimeException("Unsupported template driver: {$driver}"), }; if ($driver === 'eyrie' && !class_exists(\Eyrie\Engine::class)) { throw new \RuntimeException("Eyrie Engine not found. Did you install getphred/eyrie?"); } $builder->addDefinitions([ \Phred\Template\Contracts\RendererInterface::class => \DI\autowire($impl), ]); } public function boot(Container $container): void {} }