SymfonyComponentHttpFoundationSessionStorageMetadataBag

Metadata container.

Adds metadata to the session.

File
vendorSymfonyComponentHttpFoundationSessionStorageMetadataBag.php
Package
Default
Class hierarchy
SymfonyComponentHttpFoundationSessionStorageMetadataBag
Implements
SymfonyComponentHttpFoundationSessionSessionBagInterface

Tags

author

Drak drak@zikula.org

Constants

CREATED

CREATED

Tags

None found

UPDATED

UPDATED

Tags

None found

LIFETIME

LIFETIME

Tags

None found

Properties

$meta

$meta : array

Type

array

Tags

None found

$name

$name : string

Type

string

Tags

None found

$storageKey

$storageKey : string

Type

string

Tags

None found

$lastUsed

$lastUsed : integer

Unix timestamp.

Type

integer

Tags

None found

Methods

__construct()

__construct(string  $storageKey = '_sf2_meta') 

Constructor.

Parameters

string $storageKey

The key used to store bag in the session.

Tags

None found

initialize()

initialize(array  $array) 

Initializes the Bag

Parameters

array $array

Tags

None found

getLifetime()

getLifetime() : integer

Gets the lifetime that the session cookie was set with.

Returns

integer

Tags

None found

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.

Tags

None found

getStorageKey()

getStorageKey() : string

Gets the storage key for this bag.

Returns

string

Tags

None found

getCreated()

getCreated() : integer

Gets the created timestamp metadata.

Returns

integer —

Unix timestamp

Tags

None found

getLastUsed()

getLastUsed() : integer

Gets the last used metadata.

Returns

integer —

Unix timestamp

Tags

None found

clear()

clear() : mixed

Clears out data from bag.

Returns

mixed —

Whatever data was contained.

Tags

None found

getName()

getName() : string

Gets this bag's name

Returns

string

Tags

None found

setName()

setName(string  $name) 

Sets name.

Parameters

string $name

Tags

None found

stampCreated()

stampCreated(  $lifetime = null) 

Parameters

$lifetime

Tags

None found