1 | <?php declare(strict_types=1); |
||
29 | class CookieJar implements CookieJarInterface |
||
30 | { |
||
31 | /** |
||
32 | * @var CookieInterface[] |
||
33 | */ |
||
34 | private $cookies; |
||
35 | |||
36 | /** |
||
37 | * @var string |
||
38 | */ |
||
39 | private $defaultPath; |
||
40 | |||
41 | /** |
||
42 | * @var string |
||
43 | */ |
||
44 | private $defaultDomain; |
||
45 | |||
46 | /** |
||
47 | * @var bool |
||
48 | */ |
||
49 | private $defaultIsSecure; |
||
50 | |||
51 | /** |
||
52 | * @var bool |
||
53 | */ |
||
54 | private $defaultIsHttpOnly; |
||
55 | |||
56 | /** |
||
57 | * @var bool |
||
58 | */ |
||
59 | private $defaultIsRaw; |
||
60 | |||
61 | /** |
||
62 | * @param string $defaultPath |
||
63 | * @param string $defaultDomain |
||
64 | * @param bool $defaultIsSecure |
||
65 | 3 | * @param bool $defaultIsHttpOnly |
|
66 | * @param bool $defaultIsRaw |
||
67 | */ |
||
68 | public function __construct( |
||
82 | |||
83 | |||
84 | 2 | /** |
|
85 | * @inheritdoc |
||
86 | 2 | */ |
|
87 | 1 | public function create(string $cookieName): CookieInterface |
|
108 | |||
109 | 2 | /** |
|
110 | * @inheritdoc |
||
111 | 2 | */ |
|
112 | public function has(string $cookieName): bool |
||
116 | |||
117 | 1 | /** |
|
118 | * @inheritdoc |
||
119 | 1 | */ |
|
120 | public function get(string $cookieName): CookieInterface |
||
124 | |||
125 | 1 | /** |
|
126 | * @inheritdoc |
||
127 | 1 | */ |
|
128 | public function delete(string $cookieName): CookieJarInterface |
||
134 | |||
135 | 2 | /** |
|
136 | * @inheritdoc |
||
137 | */ |
||
138 | 2 | public function getAll(): iterable |
|
145 | |||
146 | 2 | /** |
|
147 | * @return string |
||
148 | 2 | */ |
|
149 | protected function getDefaultPath(): string |
||
153 | |||
154 | 2 | /** |
|
155 | * @return string |
||
156 | 2 | */ |
|
157 | protected function getDefaultDomain(): string |
||
161 | |||
162 | /** |
||
163 | * @return bool |
||
164 | 2 | * |
|
165 | * @SuppressWarnings(PHPMD.BooleanGetMethodName) |
||
166 | 2 | */ |
|
167 | protected function getDefaultIsSecure(): bool |
||
171 | |||
172 | /** |
||
173 | * @return bool |
||
174 | 2 | * |
|
175 | * @SuppressWarnings(PHPMD.BooleanGetMethodName) |
||
176 | 2 | */ |
|
177 | protected function getDefaultIsHttpOnly(): bool |
||
181 | |||
182 | /** |
||
183 | * @return bool |
||
184 | 2 | * |
|
185 | * @SuppressWarnings(PHPMD.BooleanGetMethodName) |
||
186 | 2 | */ |
|
187 | protected function getDefaultIsRaw(): bool |
||
191 | } |
||
192 |