32 lines
822 B
PHP
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;
|
|
}
|
|
}
|