Files
breadcrumb-the-shire/lib/Service/Branding/BrandingServicesFactory.php
2026-03-04 15:56:58 +01:00

32 lines
822 B
PHP

<?php
namespace MintyPHP\Service\Branding;
use MintyPHP\Service\Settings\SettingGateway;
class BrandingServicesFactory
{
private ?BrandingLogoService $brandingLogoService = null;
private ?BrandingFaviconService $brandingFaviconService = null;
public function __construct(
private readonly SettingGateway $settingGateway
) {
}
public function createBrandingLogoService(): BrandingLogoService
{
return $this->brandingLogoService ??= new BrandingLogoService();
}
public function createBrandingFaviconService(): BrandingFaviconService
{
return $this->brandingFaviconService ??= new BrandingFaviconService($this->createSettingGateway());
}
private function createSettingGateway(): SettingGateway
{
return $this->settingGateway;
}
}