give
/
vendor
/
vendor-prefixed
/
symfony
/
http-foundation
/
Session
/
Attribute
/
AttributeBagInterface.php
AttributeBag.php
2 years ago
AttributeBagInterface.php
2 years ago
NamespacedAttributeBag.php
2 years ago
AttributeBagInterface.php
76 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\Attribute; |
| 16 | |
| 17 | use Give\Vendors\Symfony\Component\HttpFoundation\Session\SessionBagInterface; |
| 18 | |
| 19 | /** |
| 20 | * Attributes store. |
| 21 | * |
| 22 | * @author Drak <drak@zikula.org> |
| 23 | */ |
| 24 | interface AttributeBagInterface extends SessionBagInterface |
| 25 | { |
| 26 | /** |
| 27 | * Checks if an attribute is defined. |
| 28 | * |
| 29 | * @param string $name The attribute name |
| 30 | * |
| 31 | * @return bool true if the attribute is defined, false otherwise |
| 32 | */ |
| 33 | public function has($name); |
| 34 | |
| 35 | /** |
| 36 | * Returns an attribute. |
| 37 | * |
| 38 | * @param string $name The attribute name |
| 39 | * @param mixed $default The default value if not found |
| 40 | * |
| 41 | * @return mixed |
| 42 | */ |
| 43 | public function get($name, $default = null); |
| 44 | |
| 45 | /** |
| 46 | * Sets an attribute. |
| 47 | * |
| 48 | * @param string $name |
| 49 | * @param mixed $value |
| 50 | */ |
| 51 | public function set($name, $value); |
| 52 | |
| 53 | /** |
| 54 | * Returns attributes. |
| 55 | * |
| 56 | * @return array Attributes |
| 57 | */ |
| 58 | public function all(); |
| 59 | |
| 60 | /** |
| 61 | * Sets attributes. |
| 62 | * |
| 63 | * @param array $attributes Attributes |
| 64 | */ |
| 65 | public function replace(array $attributes); |
| 66 | |
| 67 | /** |
| 68 | * Removes an attribute. |
| 69 | * |
| 70 | * @param string $name |
| 71 | * |
| 72 | * @return mixed The removed value or null when it does not exist |
| 73 | */ |
| 74 | public function remove($name); |
| 75 | } |
| 76 |