give
/
vendor
/
vendor-prefixed
/
symfony
/
http-foundation
/
Session
/
Flash
/
FlashBagInterface.php
FlashBagInterface.php
97 lines
| 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 | * Modified by impress-org on 23-January-2024 using Strauss. |
| 12 | * @see https://github.com/BrianHenryIE/strauss |
| 13 | */ |
| 14 | |
| 15 | namespace Give\Vendors\Symfony\Component\HttpFoundation\Session\Flash; |
| 16 | |
| 17 | use Give\Vendors\Symfony\Component\HttpFoundation\Session\SessionBagInterface; |
| 18 | |
| 19 | /** |
| 20 | * FlashBagInterface. |
| 21 | * |
| 22 | * @author Drak <drak@zikula.org> |
| 23 | */ |
| 24 | interface FlashBagInterface extends SessionBagInterface |
| 25 | { |
| 26 | /** |
| 27 | * Adds a flash message for the given type. |
| 28 | * |
| 29 | * @param string $type |
| 30 | * @param mixed $message |
| 31 | */ |
| 32 | public function add($type, $message); |
| 33 | |
| 34 | /** |
| 35 | * Registers one or more messages for a given type. |
| 36 | * |
| 37 | * @param string $type |
| 38 | * @param string|array $messages |
| 39 | */ |
| 40 | public function set($type, $messages); |
| 41 | |
| 42 | /** |
| 43 | * Gets flash messages for a given type. |
| 44 | * |
| 45 | * @param string $type Message category type |
| 46 | * @param array $default Default value if $type does not exist |
| 47 | * |
| 48 | * @return array |
| 49 | */ |
| 50 | public function peek($type, array $default = []); |
| 51 | |
| 52 | /** |
| 53 | * Gets all flash messages. |
| 54 | * |
| 55 | * @return array |
| 56 | */ |
| 57 | public function peekAll(); |
| 58 | |
| 59 | /** |
| 60 | * Gets and clears flash from the stack. |
| 61 | * |
| 62 | * @param string $type |
| 63 | * @param array $default Default value if $type does not exist |
| 64 | * |
| 65 | * @return array |
| 66 | */ |
| 67 | public function get($type, array $default = []); |
| 68 | |
| 69 | /** |
| 70 | * Gets and clears flashes from the stack. |
| 71 | * |
| 72 | * @return array |
| 73 | */ |
| 74 | public function all(); |
| 75 | |
| 76 | /** |
| 77 | * Sets all flash messages. |
| 78 | */ |
| 79 | public function setAll(array $messages); |
| 80 | |
| 81 | /** |
| 82 | * Has flash messages for a given type? |
| 83 | * |
| 84 | * @param string $type |
| 85 | * |
| 86 | * @return bool |
| 87 | */ |
| 88 | public function has($type); |
| 89 | |
| 90 | /** |
| 91 | * Returns a list of all defined types. |
| 92 | * |
| 93 | * @return array |
| 94 | */ |
| 95 | public function keys(); |
| 96 | } |
| 97 |