|
- <?php
-
- namespace domain\User\User;
-
- use domain\_\AbstractManager;
-
- class UserManager extends AbstractManager
- {
- protected UserBuilder $userBuilder;
- protected UserNotifier $userNotifier;
-
- public function loadDependencies(): void
- {
- $this->userBuilder = $this->loadService(UserBuilder::class);
- $this->userNotifier = $this->loadService(UserNotifier::class);
- }
-
- public function welcome(User $user)
- {
- $password = $this->userBuilder->generatePassword($user);
- $this->userNotifier->sendMailWelcome($user, $password);
-
- }
-
- public function newPassword(User $user)
- {
- $password = $this->userBuilder->generatePassword($user);
- $this->userNotifier->sendMailNewPassword($user, $password);
- }
- }
|