1 | <?php |
||
21 | class PasswordRequestFactory implements PasswordRequestFactoryInterface |
||
22 | { |
||
23 | use SmartObject; |
||
24 | |||
25 | /** @var \SixtyEightPublishers\DoctrinePersistence\TransactionFactoryInterface */ |
||
26 | private $transactionFactory; |
||
27 | |||
28 | /** @var \SixtyEightPublishers\DoctrineQueryObjects\ExecutableQueryObjectFactoryInterface */ |
||
29 | private $executableQueryObjectFactory; |
||
30 | |||
31 | /** @var \SixtyEightPublishers\User\ForgotPassword\Query\GetUserByEmailQueryObjectFactoryInterface */ |
||
32 | private $getUserByEmailQueryFactory; |
||
33 | |||
34 | /** @var \SixtyEightPublishers\User\ForgotPassword\Query\CancelPasswordRequestsByUserQueryObjectFactoryInterface */ |
||
35 | private $cancelPasswordRequestsByUserQueryFactory; |
||
36 | |||
37 | /** |
||
38 | * @param \SixtyEightPublishers\DoctrinePersistence\TransactionFactoryInterface $transactionFactory |
||
39 | * @param \SixtyEightPublishers\DoctrineQueryObjects\ExecutableQueryObjectFactoryInterface $executableQueryObjectFactory |
||
40 | * @param \SixtyEightPublishers\User\ForgotPassword\Query\GetUserByEmailQueryObjectFactoryInterface $getUserByEmailQueryFactory |
||
41 | * @param \SixtyEightPublishers\User\ForgotPassword\Query\CancelPasswordRequestsByUserQueryObjectFactoryInterface $cancelPasswordRequestsByUserQueryFactory |
||
42 | */ |
||
43 | public function __construct(TransactionFactoryInterface $transactionFactory, ExecutableQueryObjectFactoryInterface $executableQueryObjectFactory, GetUserByEmailQueryObjectFactoryInterface $getUserByEmailQueryFactory, CancelPasswordRequestsByUserQueryObjectFactoryInterface $cancelPasswordRequestsByUserQueryFactory) |
||
50 | |||
51 | /** |
||
52 | * {@inheritdoc} |
||
53 | * |
||
54 | * @throws \Throwable |
||
55 | */ |
||
56 | public function create(string $email): PasswordRequestInterface |
||
94 | |||
95 | /** |
||
96 | * @param \SixtyEightPublishers\User\ForgotPassword\Entity\UserInterface $user |
||
97 | * |
||
98 | * @return \SixtyEightPublishers\User\ForgotPassword\Entity\PasswordRequestInterface |
||
99 | * @throws \Exception |
||
100 | */ |
||
101 | protected function createPasswordRequestEntity(UserInterface $user): PasswordRequestInterface |
||
105 | } |
||
106 |