1 | <?php |
||
12 | class TokenLoader implements TokenLoaderInterface |
||
13 | { |
||
14 | /** |
||
15 | * @var TokenRepository |
||
16 | */ |
||
17 | protected $tokenRepository; |
||
18 | |||
19 | /** |
||
20 | * @var Clock |
||
21 | */ |
||
22 | protected $clock; |
||
23 | |||
24 | /** |
||
25 | * Construct. |
||
26 | * |
||
27 | * @param TokenRepository $tokenRepository |
||
28 | * @param Clock $clock |
||
29 | */ |
||
30 | 12 | public function __construct(TokenRepository $tokenRepository, Clock $clock) |
|
35 | |||
36 | /** |
||
37 | * @see TokenLoaderInterface::retrieveByHash() |
||
38 | */ |
||
39 | public function retrieveByHash($hash) |
||
46 | |||
47 | /** |
||
48 | * @param $hash |
||
49 | * |
||
50 | * @return \Doctrine\ORM\QueryBuilder |
||
51 | */ |
||
52 | 4 | public function retrieveByHashQueryBuilder($hash) |
|
61 | |||
62 | /** |
||
63 | * @see TokenLoaderInterface::retrieveExpired() |
||
64 | */ |
||
65 | public function retrieveExpired(\DateTime $datetime = null) |
||
71 | |||
72 | /** |
||
73 | * @param \DateTime|null $datetime |
||
74 | * |
||
75 | * @return \Doctrine\ORM\QueryBuilder |
||
76 | */ |
||
77 | 4 | public function retrieveExpiredQueryBuilder(\DateTime $datetime = null) |
|
84 | } |
||
85 |