-
-
Notifications
You must be signed in to change notification settings - Fork 115
Expand file tree
/
Copy pathIMessageStorage.php
More file actions
65 lines (47 loc) · 1 KB
/
IMessageStorage.php
File metadata and controls
65 lines (47 loc) · 1 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
62
63
64
65
<?php
/**
* This file is part of the Nette Framework (http://nette.org)
* Copyright (c) 2004 David Grudl (http://davidgrudl.com)
*/
namespace Nette\Application;
use Nette;
/**
* @author Filip Procházka
*/
interface IMessageStorage
{
const FLASH_KEY = '_fid';
/**
* @param string
*/
function setId($id);
/**
* @return string
*/
function getId();
/**
* Checks if a storage contains messages.
* @return bool
*/
function hasMessages();
/**
* Stores flash message for given component path and returns it's value object for further modifications.
* @param string
* @param string
* @param string
* @return object
*/
function addMessage($message, $type = 'info', $id = 'flash');
/**
* Returns array of stored flash messages for given component path.
* @param string
* @return object[]
*/
function getMessages($id = NULL);
/**
* Sets expiration for currently opened messages
* @param string
* @return void
*/
function setExpiration($expiration);
}