| 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) |
||
| 22 | |||
| 23 | /** |
||
| 24 | * Disable Etag for current request. |
||
| 25 | * |
||
| 26 | * @return void |
||
| 27 | */ |
||
| 28 | public function disableEtag() |
||
| 32 | |||
| 33 | /** |
||
| 34 | * Enable Etag for current request. |
||
| 35 | * |
||
| 36 | * @return void |
||
| 37 | */ |
||
| 38 | public function enableEtag() |
||
| 42 | |||
| 43 | /** |
||
| 44 | * Get configuration value for a specific key. |
||
| 45 | * |
||
| 46 | * @param string $key |
||
| 47 | * |
||
| 48 | * @return mixed |
||
| 49 | */ |
||
| 50 | abstract public function getConfig($key); |
||
| 51 | |||
| 52 | /** |
||
| 53 | * Set configuration value for a specific key. |
||
| 54 | * |
||
| 55 | * @param string $key |
||
| 56 | * @param mixed $value |
||
| 57 | * |
||
| 58 | * @return void |
||
| 59 | */ |
||
| 60 | abstract public function setConfig($key, $value); |
||
| 61 | } |
||
| 62 |