Completed
Push — master ( d2ee45...5d494d )
by Adam
04:50 queued 02:51
created

IStorage::clear()

Size

Total Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 1
ccs 0
cts 0
cp 0
c 0
b 0
f 0
1
<?php
2
/**
3
 * IStorage.php
4
 *
5
 * @copyright      More in license.md
6
 * @license        http://www.ipublikuj.eu
7
 * @author         Adam Kadlec http://www.ipublikuj.eu
8
 * @package        iPublikuj:ConfirmationDialog!
9
 * @subpackage     Storage
10
 * @since          2.1.0
11
 *
12
 * @date           26.07.14
13
 */
14
15
declare(strict_types = 1);
16
17
namespace IPub\ConfirmationDialog\Storage;
18
19
use Nette;
20
use Nette\Http;
21
22
/**
23
 * Confirmer status storage interface
24
 *
25
 * @package        iPublikuj:ConfirmationDialog!
26
 * @subpackage     Storage
27
 *
28
 * @author         Adam Kadlec <[email protected]>
29
 */
30 1
interface IStorage
31
{
32
	/**
33
	 * Stores the given ($key, $value) pair, so that future calls to
34
	 * get($key) return $value. This call may be in another request.
35
	 *
36
	 * @param string $key
37
	 * @param mixed $value
38
	 *
39
	 * @return void
40
	 */
41
	function set(string $key, $value);
42
43
	/**
44
	 * Get the data for $key
45
	 *
46
	 * @param string $key    The key of the data to retrieve
47
	 * @param mixed $default The default value to return if $key is not found
48
	 *
49
	 * @return mixed
50
	 */
51
	function get(string $key, $default = FALSE);
52
53
	/**
54
	 * Clear the data with $key from the persistent storage
55
	 *
56
	 * @param string $key
57
	 *
58
	 * @return void
59
	 */
60
	function clear(string $key);
61
62
	/**
63
	 * Clear all data from the persistent storage
64
	 *
65
	 * @return void
66
	 */
67
	function clearAll();
68
}
69