1 | <?php |
||
15 | class CacheKeyBuilder |
||
16 | { |
||
17 | /** |
||
18 | * @var string |
||
19 | */ |
||
20 | const IDENTIFIER_SEPARATOR = '|'; |
||
21 | |||
22 | /** |
||
23 | * @var string |
||
24 | */ |
||
25 | const IDENTIFIER_PREFIX = ':'; |
||
26 | |||
27 | /** |
||
28 | * @var EtagHasherInterface |
||
29 | */ |
||
30 | protected $etag_hasher; |
||
31 | |||
32 | /** |
||
33 | * @var RegistryInterface|null |
||
34 | */ |
||
35 | protected $doctrine; |
||
36 | |||
37 | /** |
||
38 | * @param EtagHasherInterface $etag_hasher |
||
39 | */ |
||
40 | 9 | public function __construct(EtagHasherInterface $etag_hasher) |
|
44 | |||
45 | /** |
||
46 | * @param RegistryInterface $doctrine |
||
47 | * |
||
48 | * @return CacheKeyBuilder |
||
49 | */ |
||
50 | 9 | public function setDoctrine(RegistryInterface $doctrine) |
|
56 | |||
57 | /** |
||
58 | * @param object $entity |
||
59 | * |
||
60 | * @return string|null |
||
61 | */ |
||
62 | 4 | public function getEntityAlias($entity) |
|
84 | |||
85 | /** |
||
86 | * @param object $entity |
||
87 | * |
||
88 | * @return string|null |
||
89 | */ |
||
90 | 4 | public function getEntityIdentifier($entity) |
|
104 | |||
105 | /** |
||
106 | * @param Response $response |
||
107 | * |
||
108 | * @return string |
||
109 | */ |
||
110 | 1 | public function getEtag(Response $response) |
|
114 | } |
||
115 |