1 | <?php |
||
7 | trait ManageEtagHeader |
||
8 | { |
||
9 | /** |
||
10 | * Add an ETag header to the current response. |
||
11 | * |
||
12 | * @param \Symfony\Component\HttpFoundation\Response $response |
||
13 | * |
||
14 | * @return void |
||
15 | */ |
||
16 | protected function addEtagHeader(Response $response): void |
||
25 | |||
26 | /** |
||
27 | * Disable Etag for current request. |
||
28 | * |
||
29 | * @return void |
||
30 | */ |
||
31 | public function disableEtag(): void |
||
35 | |||
36 | /** |
||
37 | * Enable Etag for current request. |
||
38 | * |
||
39 | * @return void |
||
40 | */ |
||
41 | public function enableEtag(): void |
||
45 | |||
46 | /** |
||
47 | * Get configuration value for a specific key. |
||
48 | * |
||
49 | * @param string $key |
||
50 | * |
||
51 | * @return mixed |
||
52 | */ |
||
53 | abstract public function getConfig($key); |
||
54 | |||
55 | /** |
||
56 | * Set configuration value for a specific key. |
||
57 | * |
||
58 | * @param string $key |
||
59 | * @param mixed $value |
||
60 | * |
||
61 | * @return void |
||
62 | */ |
||
63 | abstract public function setConfig($key, $value): void; |
||
64 | } |
||
65 |