1 | <?php |
||
27 | class ByInvitationSignUpUserHandler |
||
28 | { |
||
29 | /** |
||
30 | * The user password encoder. |
||
31 | * |
||
32 | * @var UserPasswordEncoder |
||
33 | */ |
||
34 | private $encoder; |
||
35 | |||
36 | /** |
||
37 | * The user repository. |
||
38 | * |
||
39 | * @var UserRepository |
||
40 | */ |
||
41 | private $userRepository; |
||
42 | |||
43 | /** |
||
44 | * Constructor. |
||
45 | * |
||
46 | * @param UserRepository $aUserRepository The user repository |
||
47 | * @param UserPasswordEncoder $anEncoder The password encoder |
||
48 | */ |
||
49 | public function __construct(UserRepository $aUserRepository, UserPasswordEncoder $anEncoder) |
||
54 | |||
55 | /** |
||
56 | * Handles the given command. |
||
57 | * |
||
58 | * @param ByInvitationSignUpUserCommand $aCommand The command |
||
59 | * |
||
60 | * @throws UserDoesNotExistException when the user does not exist |
||
61 | */ |
||
62 | public function __invoke(ByInvitationSignUpUserCommand $aCommand) |
||
75 | } |
||
76 |