2026-03-14 21:45:58 +01:00
|
|
|
<?php
|
|
|
|
|
|
2026-03-18 22:20:20 +01:00
|
|
|
namespace MintyPHP\Module\Bookmarks\Service;
|
2026-03-14 21:45:58 +01:00
|
|
|
|
2026-03-18 22:20:20 +01:00
|
|
|
use MintyPHP\Module\Bookmarks\Repository\BookmarkGroupRepository;
|
|
|
|
|
use MintyPHP\Module\Bookmarks\Repository\BookmarkGroupRepositoryInterface;
|
|
|
|
|
use MintyPHP\Module\Bookmarks\Repository\BookmarkNavigationRepository;
|
|
|
|
|
use MintyPHP\Module\Bookmarks\Repository\BookmarkNavigationRepositoryInterface;
|
|
|
|
|
use MintyPHP\Module\Bookmarks\Repository\BookmarkRepository;
|
|
|
|
|
use MintyPHP\Module\Bookmarks\Repository\BookmarkRepositoryInterface;
|
2026-03-14 21:45:58 +01:00
|
|
|
|
2026-03-18 22:20:20 +01:00
|
|
|
class BookmarkRepositoryFactory
|
2026-03-14 21:45:58 +01:00
|
|
|
{
|
|
|
|
|
private ?BookmarkRepository $bookmarkRepository = null;
|
|
|
|
|
private ?BookmarkGroupRepository $groupRepository = null;
|
|
|
|
|
private ?BookmarkNavigationRepository $navigationRepository = null;
|
|
|
|
|
|
2026-03-18 22:20:20 +01:00
|
|
|
public function createBookmarkRepository(): BookmarkRepositoryInterface
|
2026-03-14 21:45:58 +01:00
|
|
|
{
|
|
|
|
|
return $this->bookmarkRepository ??= new BookmarkRepository();
|
|
|
|
|
}
|
|
|
|
|
|
2026-03-18 22:20:20 +01:00
|
|
|
public function createBookmarkGroupRepository(): BookmarkGroupRepositoryInterface
|
2026-03-14 21:45:58 +01:00
|
|
|
{
|
|
|
|
|
return $this->groupRepository ??= new BookmarkGroupRepository();
|
|
|
|
|
}
|
|
|
|
|
|
2026-03-18 22:20:20 +01:00
|
|
|
public function createBookmarkNavigationRepository(): BookmarkNavigationRepositoryInterface
|
2026-03-14 21:45:58 +01:00
|
|
|
{
|
|
|
|
|
return $this->navigationRepository ??= new BookmarkNavigationRepository();
|
|
|
|
|
}
|
|
|
|
|
}
|