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\Attribute;
14 use Symfony\Component\HttpFoundation\Session\SessionBagInterface;
19 * @author Drak <drak@zikula.org>
21 interface AttributeBagInterface extends SessionBagInterface
24 * Checks if an attribute is defined.
26 * @param string $name The attribute name
28 * @return bool true if the attribute is defined, false otherwise
30 public function has($name);
33 * Returns an attribute.
35 * @param string $name The attribute name
36 * @param mixed $default The default value if not found
40 public function get($name, $default = null);
48 public function set($name, $value);
53 * @return array Attributes
55 public function all();
60 * @param array $attributes Attributes
62 public function replace(array $attributes);
65 * Removes an attribute.
69 * @return mixed The removed value or null when it does not exist
71 public function remove($name);