forked from fa/breadcrumb-the-shire
Migrates addressbook service classes from core namespace (MintyPHP\Service\AddressBook\*) to proper module namespace (MintyPHP\Module\AddressBook\Service\*), consistent with the bookmarks module pattern. Moved to module: - AddressBookService → modules/addressbook/lib/Module/AddressBook/Service/ - AddressBookServicesFactory → modules/addressbook/lib/Module/AddressBook/Service/ - AddressBookServiceTest → modules/addressbook/tests/Module/AddressBook/Service/ - Pages, templates, CSS, JS all in module directory All module PHP classes now live under MintyPHP\Module\<Name>\*, enforced by ModuleStructureContractTest::testModuleClassesUseModuleNamespace. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
30 lines
1.2 KiB
PHP
30 lines
1.2 KiB
PHP
<?php
|
|
|
|
namespace MintyPHP\Module\AddressBook;
|
|
|
|
use MintyPHP\App\AppContainer;
|
|
use MintyPHP\App\Container\ContainerRegistrar;
|
|
use MintyPHP\Module\AddressBook\Service\AddressBookService;
|
|
use MintyPHP\Module\AddressBook\Service\AddressBookServicesFactory;
|
|
use MintyPHP\Service\CustomField\CustomFieldServicesFactory;
|
|
use MintyPHP\Service\Directory\DirectoryServicesFactory;
|
|
use MintyPHP\Service\Tenant\TenantScopeService;
|
|
use MintyPHP\Service\User\UserServicesFactory;
|
|
|
|
final class AddressBookContainerRegistrar implements ContainerRegistrar
|
|
{
|
|
public function register(AppContainer $container): void
|
|
{
|
|
$container->set(AddressBookServicesFactory::class, static fn (AppContainer $c): AddressBookServicesFactory => new AddressBookServicesFactory(
|
|
$c->get(UserServicesFactory::class),
|
|
$c->get(DirectoryServicesFactory::class),
|
|
$c->get(CustomFieldServicesFactory::class),
|
|
$c->get(TenantScopeService::class)
|
|
));
|
|
|
|
$container->set(AddressBookService::class, static fn (AppContainer $c): AddressBookService => $c
|
|
->get(AddressBookServicesFactory::class)
|
|
->createAddressBookService());
|
|
}
|
|
}
|