1 | <?php |
||
18 | class TokenManager implements TokenManagerInterface |
||
|
|||
19 | { |
||
20 | /** |
||
21 | * @var TokenFactoryInterface |
||
22 | */ |
||
23 | private $factory; |
||
24 | |||
25 | /** |
||
26 | * @var TokenRepositoryInterface |
||
27 | */ |
||
28 | private $repository; |
||
29 | |||
30 | /** |
||
31 | * @var InformationGuesserInterface |
||
32 | */ |
||
33 | private $informationGuesser; |
||
34 | |||
35 | /** |
||
36 | * @var UserManagerInterface |
||
37 | */ |
||
38 | private $userManager; |
||
39 | |||
40 | /** |
||
41 | * @var EventDispatcher |
||
42 | */ |
||
43 | private $eventDispatcher; |
||
44 | |||
45 | /** |
||
46 | * @param TokenFactoryInterface $factory |
||
47 | * @param TokenRepositoryInterface $repository |
||
48 | * @param InformationGuesserInterface $informationGuesser |
||
49 | * @param UserManagerInterface $userManager |
||
50 | * @param EventDispatcher $eventDispatcher |
||
51 | */ |
||
52 | 7 | public function __construct( |
|
65 | |||
66 | /** |
||
67 | * @inheritdoc |
||
68 | */ |
||
69 | 4 | public function get($purpose, $value) |
|
91 | |||
92 | /** |
||
93 | * @inheritdoc |
||
94 | */ |
||
95 | 1 | public function create($purpose, $user, array $payload = []) |
|
107 | |||
108 | /** |
||
109 | * @inheritdoc |
||
110 | */ |
||
111 | public function setUsed(Token $token, DateTime $at = null) |
||
121 | |||
122 | /** |
||
123 | * @inheritDoc |
||
124 | */ |
||
125 | 1 | public function consume(Token $token, DateTime $at = null) |
|
138 | |||
139 | /** |
||
140 | * @inheritdoc |
||
141 | */ |
||
142 | 1 | public function getUser(Token $token) |
|
146 | } |
||
147 |