-
Notifications
You must be signed in to change notification settings - Fork 0
/
CookieJarInterface.php
55 lines (49 loc) · 1.14 KB
/
CookieJarInterface.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
<?php
namespace HZ\Contracts\Storage;
interface CookieJarInterface
{
/**
* Add new cookie
*
* @param string $name
* @param string $value
* @param int $minutes
* @return $this
*/
public function set(string $name, string $value, int $minutes): CookieJarInterface;
/**
* Check if the cookie has a value for the given key
*
* @param string $key
* @return boolean
*/
public function has(string $key): bool;
/**
* Get a value from the storage container
* If no value exists for the given key, return the default value instead
*
* @param string $key
* @param mixed $default
* @return mixed
*/
public function get(string $key, $default);
/**
* Remove the value from the container
*
* @param string $key
* @return void
*/
public function remove(string $key);
/**
* Get all cookies
*
* @return iterable
*/
public function all(): iterable;
/**
* Clear all cookies
*
* @return void
*/
public function flush();
}