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 EntityManagerInterface|null |
||
34 | */ |
||
35 | protected $em; |
||
36 | |||
37 | /** |
||
38 | * @param EtagHasherInterface $etag_hasher |
||
39 | */ |
||
40 | 9 | public function __construct(EtagHasherInterface $etag_hasher) |
|
44 | |||
45 | /** |
||
46 | * @param EntityManagerInterface $em |
||
47 | * |
||
48 | * @return CacheKeyBuilder |
||
49 | */ |
||
50 | 9 | public function setEntityManager(EntityManagerInterface $em) |
|
55 | |||
56 | /** |
||
57 | * @param object $entity |
||
58 | * |
||
59 | * @return string|null |
||
60 | */ |
||
61 | 3 | public function getEntityAlias($entity) |
|
77 | |||
78 | /** |
||
79 | * @param object $entity |
||
80 | * |
||
81 | * @return string|null |
||
82 | */ |
||
83 | 4 | public function getEntityIdentifier($entity) |
|
93 | |||
94 | /** |
||
95 | * @param Response $response |
||
96 | * |
||
97 | * @return string |
||
98 | */ |
||
99 | 2 | public function getEtag(Response $response) |
|
103 | } |
||
104 |