configuration = $configuration; } public function getTemplateEngine(): TwigEnvironment { if ($this->twigEnvironment === null) { $this->twigEnvironment = TwigEnvironmentFactory::createTwigEnvironment($this->configuration); } return $this->twigEnvironment; } /** @param mixed[] $parameters */ public function render(string $template, array $parameters = []): string { return $this->getTemplateEngine()->render($template, $parameters); } }