interface AttributeBagInterface implements SessionBagInterface

Attributes store.

Methods

string
getName()

Gets this bag's name

initialize(array $array)

Initializes the Bag

string
getStorageKey()

Gets the storage key for this bag.

mixed
clear()

Clears out data from bag.

Boolean
has(string $name)

Checks if an attribute is defined.

mixed
get(string $name, mixed $default = null)

Returns an attribute.

set(string $name, mixed $value)

Sets an attribute.

array
all()

Returns attributes.

replace(array $attributes)

Sets attributes.

mixed
remove(string $name)

Removes an attribute.

Details

in SessionBagInterface at line line 26
string getName()

Gets this bag's name

Return Value

string

in SessionBagInterface at line line 33
initialize(array $array)

Initializes the Bag

Parameters

array $array

in SessionBagInterface at line line 40
string getStorageKey()

Gets the storage key for this bag.

Return Value

string

in SessionBagInterface at line line 47
mixed clear()

Clears out data from bag.

Return Value

mixed Whatever data was contained.

at line line 30
Boolean has(string $name)

Checks if an attribute is defined.

Parameters

string $name The attribute name

Return Value

Boolean true if the attribute is defined, false otherwise

at line line 40
mixed get(string $name, mixed $default = null)

Returns an attribute.

Parameters

string $name The attribute name
mixed $default The default value if not found.

Return Value

mixed

at line line 48
set(string $name, mixed $value)

Sets an attribute.

Parameters

string $name
mixed $value

at line line 55
array all()

Returns attributes.

Return Value

array Attributes

at line line 62
replace(array $attributes)

Sets attributes.

Parameters

array $attributes Attributes

at line line 71
mixed remove(string $name)

Removes an attribute.

Parameters

string $name

Return Value

mixed The removed value