1 | <?php |
||
8 | trait ManageLastModifiedHeader |
||
9 | { |
||
10 | /** |
||
11 | * Last modified header value. |
||
12 | * |
||
13 | * @var \Carbon\Carbon|null |
||
14 | */ |
||
15 | protected $lastModified = null; |
||
16 | |||
17 | /** |
||
18 | * Add Last-Modified header to the current response. |
||
19 | * |
||
20 | * @param \Symfony\Component\HttpFoundation\Response $response |
||
21 | * |
||
22 | * @return void |
||
23 | */ |
||
24 | protected function addLastModifiedHeader(Response $response) |
||
32 | |||
33 | /** |
||
34 | * Disable Last-Modified header for the current response. |
||
35 | * |
||
36 | * @return void |
||
37 | */ |
||
38 | public function disableLastModified() |
||
42 | |||
43 | /** |
||
44 | * Enable Last-Modified header for the current response. |
||
45 | * |
||
46 | * @return void |
||
47 | */ |
||
48 | public function enableLastModified() |
||
52 | |||
53 | /** |
||
54 | * Get last modified header for the current response. |
||
55 | * |
||
56 | * @return \Carbon\Carbon|null |
||
57 | */ |
||
58 | public function getLastModifiedHeader() |
||
62 | |||
63 | /** |
||
64 | * Set last modified header for the current response. |
||
65 | * |
||
66 | * @param \Carbon\Carbon|string $current |
||
67 | */ |
||
68 | public function setLastModifiedHeader($current) |
||
78 | |||
79 | /** |
||
80 | * Get configuration value for a specific key. |
||
81 | * |
||
82 | * @param string $key |
||
83 | * |
||
84 | * @return mixed |
||
85 | */ |
||
86 | abstract public function getConfig($key); |
||
87 | |||
88 | /** |
||
89 | * Set configuration value for a specific key. |
||
90 | * |
||
91 | * @param string $key |
||
92 | * @param mixed $value |
||
93 | * |
||
94 | * @return void |
||
95 | */ |
||
96 | abstract public function setConfig($key, $value); |
||
97 | } |
||
98 |