Mercurial > hg > isophonics-drupal-site
comparison vendor/symfony/http-foundation/Session/Flash/FlashBagInterface.php @ 0:4c8ae668cc8c
Initial import (non-working)
author | Chris Cannam |
---|---|
date | Wed, 29 Nov 2017 16:09:58 +0000 |
parents | |
children | 1fec387a4317 |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:4c8ae668cc8c |
---|---|
1 <?php | |
2 | |
3 /* | |
4 * This file is part of the Symfony package. | |
5 * | |
6 * (c) Fabien Potencier <fabien@symfony.com> | |
7 * | |
8 * For the full copyright and license information, please view the LICENSE | |
9 * file that was distributed with this source code. | |
10 */ | |
11 | |
12 namespace Symfony\Component\HttpFoundation\Session\Flash; | |
13 | |
14 use Symfony\Component\HttpFoundation\Session\SessionBagInterface; | |
15 | |
16 /** | |
17 * FlashBagInterface. | |
18 * | |
19 * @author Drak <drak@zikula.org> | |
20 */ | |
21 interface FlashBagInterface extends SessionBagInterface | |
22 { | |
23 /** | |
24 * Adds a flash message for type. | |
25 * | |
26 * @param string $type | |
27 * @param string $message | |
28 */ | |
29 public function add($type, $message); | |
30 | |
31 /** | |
32 * Registers a message for a given type. | |
33 * | |
34 * @param string $type | |
35 * @param string|array $message | |
36 */ | |
37 public function set($type, $message); | |
38 | |
39 /** | |
40 * Gets flash messages for a given type. | |
41 * | |
42 * @param string $type Message category type | |
43 * @param array $default Default value if $type does not exist | |
44 * | |
45 * @return array | |
46 */ | |
47 public function peek($type, array $default = array()); | |
48 | |
49 /** | |
50 * Gets all flash messages. | |
51 * | |
52 * @return array | |
53 */ | |
54 public function peekAll(); | |
55 | |
56 /** | |
57 * Gets and clears flash from the stack. | |
58 * | |
59 * @param string $type | |
60 * @param array $default Default value if $type does not exist | |
61 * | |
62 * @return array | |
63 */ | |
64 public function get($type, array $default = array()); | |
65 | |
66 /** | |
67 * Gets and clears flashes from the stack. | |
68 * | |
69 * @return array | |
70 */ | |
71 public function all(); | |
72 | |
73 /** | |
74 * Sets all flash messages. | |
75 * | |
76 * @param array $messages | |
77 */ | |
78 public function setAll(array $messages); | |
79 | |
80 /** | |
81 * Has flash messages for a given type? | |
82 * | |
83 * @param string $type | |
84 * | |
85 * @return bool | |
86 */ | |
87 public function has($type); | |
88 | |
89 /** | |
90 * Returns a list of all defined types. | |
91 * | |
92 * @return array | |
93 */ | |
94 public function keys(); | |
95 } |