1 | <?php namespace Limoncello\Application\Cookies; |
||
26 | class CookieJar implements CookieJarInterface |
||
27 | { |
||
28 | /** |
||
29 | * @var CookieInterface[] |
||
30 | */ |
||
31 | private $cookies; |
||
32 | |||
33 | /** |
||
34 | * @var string |
||
35 | */ |
||
36 | private $defaultPath; |
||
37 | |||
38 | /** |
||
39 | * @var string |
||
40 | */ |
||
41 | private $defaultDomain; |
||
42 | |||
43 | /** |
||
44 | * @var bool |
||
45 | */ |
||
46 | private $defaultIsSecure; |
||
47 | |||
48 | /** |
||
49 | * @var bool |
||
50 | */ |
||
51 | private $defaultIsHttpOnly; |
||
52 | |||
53 | /** |
||
54 | * @var bool |
||
55 | */ |
||
56 | private $defaultIsRaw; |
||
57 | |||
58 | /** |
||
59 | * @param string $defaultPath |
||
60 | * @param string $defaultDomain |
||
61 | * @param bool $defaultIsSecure |
||
62 | * @param bool $defaultIsHttpOnly |
||
63 | * @param bool $defaultIsRaw |
||
64 | */ |
||
65 | 3 | public function __construct( |
|
79 | |||
80 | |||
81 | /** |
||
82 | * @inheritdoc |
||
83 | */ |
||
84 | 2 | public function create(string $cookieName): CookieInterface |
|
105 | |||
106 | /** |
||
107 | * @inheritdoc |
||
108 | */ |
||
109 | 2 | public function has(string $cookieName): bool |
|
113 | |||
114 | /** |
||
115 | * @inheritdoc |
||
116 | */ |
||
117 | 1 | public function get(string $cookieName): CookieInterface |
|
121 | |||
122 | /** |
||
123 | * @inheritdoc |
||
124 | */ |
||
125 | 1 | public function delete(string $cookieName): CookieJarInterface |
|
131 | |||
132 | /** |
||
133 | * @inheritdoc |
||
134 | */ |
||
135 | 2 | public function getAll(): iterable |
|
142 | |||
143 | /** |
||
144 | * @return string |
||
145 | */ |
||
146 | 2 | protected function getDefaultPath(): string |
|
150 | |||
151 | /** |
||
152 | * @return string |
||
153 | */ |
||
154 | 2 | protected function getDefaultDomain(): string |
|
158 | |||
159 | /** |
||
160 | * @return bool |
||
161 | * |
||
162 | * @SuppressWarnings(PHPMD.BooleanGetMethodName) |
||
163 | */ |
||
164 | 2 | protected function getDefaultIsSecure(): bool |
|
168 | |||
169 | /** |
||
170 | * @return bool |
||
171 | * |
||
172 | * @SuppressWarnings(PHPMD.BooleanGetMethodName) |
||
173 | */ |
||
174 | 2 | protected function getDefaultIsHttpOnly(): bool |
|
178 | |||
179 | /** |
||
180 | * @return bool |
||
181 | * |
||
182 | * @SuppressWarnings(PHPMD.BooleanGetMethodName) |
||
183 | */ |
||
184 | 2 | protected function getDefaultIsRaw(): bool |
|
188 | } |
||
189 |