composer package updates
[openemr.git] / vendor / symfony / http-foundation / Session / Flash / FlashBagInterface.php
blob80e97f17cdff35d292b1c13109bc5018ad736203
1 <?php
3 /*
4 * This file is part of the Symfony package.
6 * (c) Fabien Potencier <fabien@symfony.com>
8 * For the full copyright and license information, please view the LICENSE
9 * file that was distributed with this source code.
12 namespace Symfony\Component\HttpFoundation\Session\Flash;
14 use Symfony\Component\HttpFoundation\Session\SessionBagInterface;
16 /**
17 * FlashBagInterface.
19 * @author Drak <drak@zikula.org>
21 interface FlashBagInterface extends SessionBagInterface
23 /**
24 * Adds a flash message for type.
26 * @param string $type
27 * @param string $message
29 public function add($type, $message);
31 /**
32 * Registers a message for a given type.
34 * @param string $type
35 * @param string|array $message
37 public function set($type, $message);
39 /**
40 * Gets flash messages for a given type.
42 * @param string $type Message category type
43 * @param array $default Default value if $type does not exist
45 * @return array
47 public function peek($type, array $default = array());
49 /**
50 * Gets all flash messages.
52 * @return array
54 public function peekAll();
56 /**
57 * Gets and clears flash from the stack.
59 * @param string $type
60 * @param array $default Default value if $type does not exist
62 * @return array
64 public function get($type, array $default = array());
66 /**
67 * Gets and clears flashes from the stack.
69 * @return array
71 public function all();
73 /**
74 * Sets all flash messages.
76 public function setAll(array $messages);
78 /**
79 * Has flash messages for a given type?
81 * @param string $type
83 * @return bool
85 public function has($type);
87 /**
88 * Returns a list of all defined types.
90 * @return array
92 public function keys();