set(NotificationRepositoryFactory::class, static fn (): NotificationRepositoryFactory => new NotificationRepositoryFactory()); $container->set(NotificationServicesFactory::class, static fn (AppContainer $c): NotificationServicesFactory => new NotificationServicesFactory( $c->get(NotificationRepositoryFactory::class) )); $container->set(NotificationService::class, static fn (AppContainer $c): NotificationService => $c->get(NotificationServicesFactory::class)->createNotificationService()); $container->set(NotificationCleanupJobHandler::class, static fn (AppContainer $c): NotificationCleanupJobHandler => new NotificationCleanupJobHandler( $c->get(NotificationService::class) )); $container->set(UserCreatedNotificationListener::class, static fn (AppContainer $c): UserCreatedNotificationListener => new UserCreatedNotificationListener( $c->get(NotificationService::class), $c->get(UserReadRepositoryInterface::class), $c->get(UserTenantRepositoryInterface::class) )); $container->set(UserDeletedNotificationListener::class, static fn (AppContainer $c): UserDeletedNotificationListener => new UserDeletedNotificationListener( $c->get(NotificationService::class), $c->get(UserReadRepositoryInterface::class) )); } }