\Symfony\Component\HttpFoundation\Session\StorageMetadataBag

Metadata container.

Adds metadata to the session.

Summary

Methods
Properties
Constants
__construct()
initialize()
getLifetime()
stampNew()
getStorageKey()
getCreated()
getLastUsed()
clear()
getName()
setName()
No public properties found
CREATED
UPDATED
LIFETIME
No protected methods found
$meta
N/A
stampCreated()
$name
$storageKey
$lastUsed
$updateThreshold
N/A

Constants

CREATED

CREATED = 'c'

UPDATED

UPDATED = 'u'

LIFETIME

LIFETIME = 'l'

Properties

$meta

$meta : array

Type

array

$name

$name : string

Type

string

$storageKey

$storageKey : string

Type

string

$lastUsed

$lastUsed : integer

Unix timestamp.

Type

integer

$updateThreshold

$updateThreshold : integer

Type

integer

Methods

__construct()

__construct(string  $storageKey = '_sf2_meta', integer  $updateThreshold) 

Parameters

string $storageKey

The key used to store bag in the session

integer $updateThreshold

The time to wait between two UPDATED updates

initialize()

initialize(array  $array) 

Initializes the Bag.

Parameters

array $array

getLifetime()

getLifetime() : integer

Gets the lifetime that the session cookie was set with.

Returns

integer

stampNew()

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.

getStorageKey()

getStorageKey() : string

Gets the storage key for this bag.

Returns

string

getCreated()

getCreated() : integer

Gets the created timestamp metadata.

Returns

integer —

Unix timestamp

getLastUsed()

getLastUsed() : integer

Gets the last used metadata.

Returns

integer —

Unix timestamp

clear()

clear() : mixed

Clears out data from bag.

Returns

mixed —

Whatever data was contained

getName()

getName() : string

Gets this bag's name.

Returns

string

setName()

setName(string  $name) 

Sets name.

Parameters

string $name

stampCreated()

stampCreated(  $lifetime = null) 

Parameters

$lifetime