1: <?php
2: /**
3: * This file is part of the Autarky package.
4: *
5: * (c) Andreas Lutro <anlutro@gmail.com>
6: *
7: * For the full copyright and license information, please view the LICENSE
8: * file that was distributed with this source code.
9: */
10:
11: namespace Autarky\Http;
12:
13: class CookieQueue
14: {
15: protected $cookies = [];
16:
17: public function has($key)
18: {
19: return array_key_exists($this->cookies, $key);
20: }
21:
22: public function get($key)
23: {
24: return $this->cookies[$key];
25: }
26:
27: public function all()
28: {
29: return $this->cookies;
30: }
31:
32: public function set($key, $value)
33: {
34: $this->cookies[$key] = $value;
35: }
36:
37: public function remove($key)
38: {
39: unset($this->cookies[$key]);
40: }
41: }
42: