-
Notifications
You must be signed in to change notification settings - Fork 215
/
StoreInterface.php
55 lines (48 loc) · 1.03 KB
/
StoreInterface.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
declare(strict_types=1);
namespace Auth0\SDK\Contract;
interface StoreInterface
{
/**
* Defer saving state changes to destination to improve performance during blocks of changes.
*
* @param bool $deferring
*/
public function defer(
bool $deferring,
): void;
/**
* Remove a value from the store.
*
* @param string $key key to delete
*/
public function delete(
string $key,
): void;
/**
* Get a value from the store by a given key.
*
* @param string $key key to get
* @param mixed $default return value if key not found
*
* @return mixed
*/
public function get(
string $key,
$default = null,
);
/**
* Remove all stored values.
*/
public function purge(): void;
/**
* Set a value on the store.
*
* @param string $key key to set
* @param mixed $value value to set
*/
public function set(
string $key,
$value,
): void;
}