1 | <?php |
||
21 | class AuthorizationCodeRepository implements AuthorizationCodeRepositoryInterface |
||
22 | { |
||
23 | /** |
||
24 | * @var AdapterInterface |
||
25 | */ |
||
26 | private $cache; |
||
27 | |||
28 | /** |
||
29 | * AuthCodeRepository constructor. |
||
30 | * |
||
31 | * @param AdapterInterface $cache |
||
32 | */ |
||
33 | public function __construct(AdapterInterface $cache) |
||
37 | |||
38 | /** |
||
39 | * {@inheritdoc} |
||
40 | */ |
||
41 | public function find(AuthorizationCodeId $authCodeId): ? AuthorizationCode |
||
47 | |||
48 | /** |
||
49 | * @param AuthorizationCode $authCode |
||
50 | */ |
||
51 | public function save(AuthorizationCode $authCode) |
||
56 | |||
57 | /** |
||
58 | * @param AuthorizationCodeId $authCodeId |
||
59 | * |
||
60 | * @return AuthorizationCode|null |
||
61 | */ |
||
62 | private function getFromCache(AuthorizationCodeId $authCodeId): ? AuthorizationCode |
||
72 | |||
73 | /** |
||
74 | * @param AuthorizationCode $authCode |
||
75 | */ |
||
76 | private function cacheObject(AuthorizationCode $authCode) |
||
84 | } |
||
85 |