forked from fa/breadcrumb-the-shire
21 lines
536 B
PHP
21 lines
536 B
PHP
|
|
<?php
|
||
|
|
|
||
|
|
namespace MintyPHP\Module\Notifications\Service;
|
||
|
|
|
||
|
|
class NotificationServicesFactory
|
||
|
|
{
|
||
|
|
private ?NotificationService $notificationService = null;
|
||
|
|
|
||
|
|
public function __construct(
|
||
|
|
private readonly NotificationRepositoryFactory $notificationRepositoryFactory
|
||
|
|
) {
|
||
|
|
}
|
||
|
|
|
||
|
|
public function createNotificationService(): NotificationService
|
||
|
|
{
|
||
|
|
return $this->notificationService ??= new NotificationService(
|
||
|
|
$this->notificationRepositoryFactory->createNotificationRepository()
|
||
|
|
);
|
||
|
|
}
|
||
|
|
}
|