-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathFlashInterface.php
More file actions
61 lines (54 loc) · 1.21 KB
/
Copy pathFlashInterface.php
File metadata and controls
61 lines (54 loc) · 1.21 KB
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
56
57
58
59
60
61
<?php
namespace Odan\Session;
/**
* Flash messages.
*/
interface FlashInterface
{
/**
* Add flash message.
*
* @param string $key The key to store the message under
* @param string $message Message to show on next request
*
* @return void
*/
public function add(string $key, string $message): void;
/**
* Get flash messages.
*
* @param string $key The key to get the message from
*
* @return array<int, string> The messages
*/
public function get(string $key): array;
/**
* Has flash message.
*
* @param string $key The key
*
* @return bool Whether the key is set or not
*/
public function has(string $key): bool;
/**
* Clear all messages.
*
* @return void
*/
public function clear(): void;
/**
* Set all messages.
*
* @param string $key The key to clear
* @param array<int, string> $messages The messages
*
* @return void
*/
public function set(string $key, array $messages): void;
/**
* Gets all flash messages.
*
* @return array<int, string> All messages. Can be an empty array.
*/
public function all(): array;
}