Files
breadcrumb-the-shire/lib/Service/Branding/BrandingServicesFactory.php

32 lines
822 B
PHP
Raw Normal View History

2026-02-23 12:58:19 +01:00
<?php
namespace MintyPHP\Service\Branding;
use MintyPHP\Service\Settings\SettingGateway;
class BrandingServicesFactory
{
private ?BrandingLogoService $brandingLogoService = null;
private ?BrandingFaviconService $brandingFaviconService = null;
2026-03-04 15:56:58 +01:00
public function __construct(
private readonly SettingGateway $settingGateway
) {
}
2026-02-23 12:58:19 +01:00
public function createBrandingLogoService(): BrandingLogoService
{
return $this->brandingLogoService ??= new BrandingLogoService();
}
public function createBrandingFaviconService(): BrandingFaviconService
{
return $this->brandingFaviconService ??= new BrandingFaviconService($this->createSettingGateway());
}
private function createSettingGateway(): SettingGateway
{
2026-03-04 15:56:58 +01:00
return $this->settingGateway;
2026-02-23 12:58:19 +01:00
}
}