1 | <?php |
||
2 | |||
3 | /* |
||
4 | * This file is part of the Koded package. |
||
5 | * |
||
6 | * (c) Mihail Binev <[email protected]> |
||
7 | * |
||
8 | * Please view the LICENSE distributed with this source code |
||
9 | * for the full copyright and license information. |
||
10 | * |
||
11 | */ |
||
12 | |||
13 | namespace Koded\Http; |
||
14 | |||
15 | trait CookieTrait |
||
16 | { |
||
17 | protected array $cookieParams = []; |
||
18 | |||
19 | public function getCookieParams(): array |
||
20 | 4 | { |
|
21 | return $this->cookieParams; |
||
22 | 4 | } |
|
23 | |||
24 | public function withCookieParams(array $cookies): static |
||
25 | 2 | { |
|
26 | $instance = clone $this; |
||
27 | 2 | $instance->cookieParams = $cookies; |
|
28 | 2 | return $instance; |
|
29 | } |
||
30 | } |
||
31 |