2026-03-18 22:20:20 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
namespace MintyPHP\Module\Bookmarks;
|
|
|
|
|
|
|
|
|
|
use MintyPHP\App\AppContainer;
|
|
|
|
|
use MintyPHP\App\Container\ContainerRegistrar;
|
2026-03-26 12:10:05 +01:00
|
|
|
use MintyPHP\Module\Bookmarks\Repository\BookmarkGroupRepository;
|
|
|
|
|
use MintyPHP\Module\Bookmarks\Repository\BookmarkNavigationRepository;
|
|
|
|
|
use MintyPHP\Module\Bookmarks\Repository\BookmarkRepository;
|
2026-03-18 22:20:20 +01:00
|
|
|
use MintyPHP\Module\Bookmarks\Service\BookmarkService;
|
|
|
|
|
|
|
|
|
|
final class BookmarksContainerRegistrar implements ContainerRegistrar
|
|
|
|
|
{
|
|
|
|
|
public function register(AppContainer $container): void
|
|
|
|
|
{
|
2026-03-26 12:10:05 +01:00
|
|
|
$container->set(BookmarkRepository::class, static fn (): BookmarkRepository => new BookmarkRepository());
|
|
|
|
|
$container->set(BookmarkGroupRepository::class, static fn (): BookmarkGroupRepository => new BookmarkGroupRepository());
|
|
|
|
|
$container->set(BookmarkNavigationRepository::class, static fn (): BookmarkNavigationRepository => new BookmarkNavigationRepository());
|
|
|
|
|
|
|
|
|
|
$container->set(BookmarkService::class, static fn (AppContainer $c): BookmarkService => new BookmarkService(
|
|
|
|
|
$c->get(BookmarkRepository::class),
|
|
|
|
|
$c->get(BookmarkGroupRepository::class),
|
|
|
|
|
$c->get(BookmarkNavigationRepository::class)
|
2026-03-18 22:20:20 +01:00
|
|
|
));
|
|
|
|
|
}
|
|
|
|
|
}
|