class MetadataBag implements SessionBagInterface

Metadata container.

Adds metadata to the session.

Constants

CREATED

UPDATED

LIFETIME

Methods

__construct(string $storageKey = '_sf2_meta')

Constructor.

initialize(array $array)

Initializes the Bag

integer
getLifetime()

Gets the lifetime that the session cookie was set with.

stampNew(integer $lifetime = null)

Stamps a new session's metadata.

string
getStorageKey()

Gets the storage key for this bag.

integer
getCreated()

Gets the created timestamp metadata.

integer
getLastUsed()

Gets the last used metadata.

mixed
clear()

Clears out data from bag.

string
getName()

Gets this bag's name

setName(string $name)

Sets name.

Details

at line line 56
__construct(string $storageKey = '_sf2_meta')

Constructor.

Parameters

string $storageKey The key used to store bag in the session.

at line line 65
initialize(array $array)

Initializes the Bag

Parameters

array $array

at line line 82
integer getLifetime()

Gets the lifetime that the session cookie was set with.

Return Value

integer

at line line 95
stampNew(integer $lifetime = null)

Stamps a new session's metadata.

Parameters

integer $lifetime Sets the cookie lifetime for the session cookie. A null value will leave the system settings unchanged, 0 sets the cookie to expire with browser session. Time is in seconds, and is not a Unix timestamp.

at line line 103
string getStorageKey()

Gets the storage key for this bag.

Return Value

string

at line line 113
integer getCreated()

Gets the created timestamp metadata.

Return Value

integer Unix timestamp

at line line 123
integer getLastUsed()

Gets the last used metadata.

Return Value

integer Unix timestamp

at line line 131
mixed clear()

Clears out data from bag.

Return Value

mixed Whatever data was contained.

at line line 139
string getName()

Gets this bag's name

Return Value

string

at line line 149
setName(string $name)

Sets name.

Parameters

string $name