annotate vendor/symfony/http-foundation/Session/Attribute/AttributeBagInterface.php @ 19:fa3358dc1485 tip

Add ndrum files
author Chris Cannam
date Wed, 28 Aug 2019 13:14:47 +0100
parents 4c8ae668cc8c
children
rev   line source
Chris@0 1 <?php
Chris@0 2
Chris@0 3 /*
Chris@0 4 * This file is part of the Symfony package.
Chris@0 5 *
Chris@0 6 * (c) Fabien Potencier <fabien@symfony.com>
Chris@0 7 *
Chris@0 8 * For the full copyright and license information, please view the LICENSE
Chris@0 9 * file that was distributed with this source code.
Chris@0 10 */
Chris@0 11
Chris@0 12 namespace Symfony\Component\HttpFoundation\Session\Attribute;
Chris@0 13
Chris@0 14 use Symfony\Component\HttpFoundation\Session\SessionBagInterface;
Chris@0 15
Chris@0 16 /**
Chris@0 17 * Attributes store.
Chris@0 18 *
Chris@0 19 * @author Drak <drak@zikula.org>
Chris@0 20 */
Chris@0 21 interface AttributeBagInterface extends SessionBagInterface
Chris@0 22 {
Chris@0 23 /**
Chris@0 24 * Checks if an attribute is defined.
Chris@0 25 *
Chris@0 26 * @param string $name The attribute name
Chris@0 27 *
Chris@0 28 * @return bool true if the attribute is defined, false otherwise
Chris@0 29 */
Chris@0 30 public function has($name);
Chris@0 31
Chris@0 32 /**
Chris@0 33 * Returns an attribute.
Chris@0 34 *
Chris@0 35 * @param string $name The attribute name
Chris@0 36 * @param mixed $default The default value if not found
Chris@0 37 *
Chris@0 38 * @return mixed
Chris@0 39 */
Chris@0 40 public function get($name, $default = null);
Chris@0 41
Chris@0 42 /**
Chris@0 43 * Sets an attribute.
Chris@0 44 *
Chris@0 45 * @param string $name
Chris@0 46 * @param mixed $value
Chris@0 47 */
Chris@0 48 public function set($name, $value);
Chris@0 49
Chris@0 50 /**
Chris@0 51 * Returns attributes.
Chris@0 52 *
Chris@0 53 * @return array Attributes
Chris@0 54 */
Chris@0 55 public function all();
Chris@0 56
Chris@0 57 /**
Chris@0 58 * Sets attributes.
Chris@0 59 *
Chris@0 60 * @param array $attributes Attributes
Chris@0 61 */
Chris@0 62 public function replace(array $attributes);
Chris@0 63
Chris@0 64 /**
Chris@0 65 * Removes an attribute.
Chris@0 66 *
Chris@0 67 * @param string $name
Chris@0 68 *
Chris@0 69 * @return mixed The removed value or null when it does not exist
Chris@0 70 */
Chris@0 71 public function remove($name);
Chris@0 72 }