forked from simplesamlphp/simplesamlphp
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathStoreInterface.php
More file actions
43 lines (36 loc) · 1013 Bytes
/
StoreInterface.php
File metadata and controls
43 lines (36 loc) · 1013 Bytes
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
<?php
declare(strict_types=1);
namespace SimpleSAML\Store;
/**
* An interface describing data stores.
*
* @package simplesamlphp/simplesamlphp
*/
interface StoreInterface
{
/**
* Retrieve a value from the data store.
*
* @param string $type The data type.
* @param string $key The key.
*
* @return mixed|null The value.
*/
public function get(string $type, string $key): mixed;
/**
* Save a value to the data store.
*
* @param string $type The data type.
* @param string $key The key.
* @param mixed $value The value.
* @param int|null $expire The expiration time (unix timestamp), or null if it never expires.
*/
public function set(string $type, string $key, mixed $value, ?int $expire = null): void;
/**
* Delete a value from the data store.
*
* @param string $type The data type.
* @param string $key The key.
*/
public function delete(string $type, string $key): void;
}