give
/
vendor
/
vendor-prefixed
/
symfony
/
http-foundation
/
Session
/
Attribute
/
AttributeBagInterface.php
AttributeBagInterface.php in GiveWP – Donation Plugin and Fundraising Platform 4.18.0.1, at vendor/vendor-prefixed/symfony/http-foundation/Session/Attribute/AttributeBagInterface.php
| 1 | <?php |
| 2 | |
| 3 | /* |
| 4 | * This file is part of the Symfony package. |
| 5 | * |
| 6 | * (c) Fabien Potencier <[email protected]> |
| 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 Give\Vendors\Symfony\Component\HttpFoundation\Session\Attribute; |
| 13 | |
| 14 | use Give\Vendors\Symfony\Component\HttpFoundation\Session\SessionBagInterface; |
| 15 | |
| 16 | /** |
| 17 | * Attributes store. |
| 18 | * |
| 19 | * @author Drak <[email protected]> |
| 20 | */ |
| 21 | interface AttributeBagInterface extends SessionBagInterface |
| 22 | { |
| 23 | /** |
| 24 | * Checks if an attribute is defined. |
| 25 | * |
| 26 | * @return bool |
| 27 | */ |
| 28 | public function has(string $name); |
| 29 | |
| 30 | /** |
| 31 | * Returns an attribute. |
| 32 | * |
| 33 | * @param mixed $default The default value if not found |
| 34 | * |
| 35 | * @return mixed |
| 36 | */ |
| 37 | public function get(string $name, $default = null); |
| 38 | |
| 39 | /** |
| 40 | * Sets an attribute. |
| 41 | * |
| 42 | * @param mixed $value |
| 43 | */ |
| 44 | public function set(string $name, $value); |
| 45 | |
| 46 | /** |
| 47 | * Returns attributes. |
| 48 | * |
| 49 | * @return array<string, mixed> |
| 50 | */ |
| 51 | public function all(); |
| 52 | |
| 53 | public function replace(array $attributes); |
| 54 | |
| 55 | /** |
| 56 | * Removes an attribute. |
| 57 | * |
| 58 | * @return mixed The removed value or null when it does not exist |
| 59 | */ |
| 60 | public function remove(string $name); |
| 61 | } |
| 62 |