Documentation

SessionMaker

Session Maker Trait

Adds session management based methods to a controller class, or a class that contains a $controller property referencing a controller.

Tags
author

Alexey Bobkov, Samuel Georges

Table of Contents

resetSession()  : void
Resets all session data related to this widget.
getSession()  : string
Retrieves a widget related key/value pair from session data.
makeSessionId()  : string
Returns a unique session identifier for this widget and controller action.
putSession()  : void
Saves a widget related key/value pair in to session data.

Methods

resetSession()

Resets all session data related to this widget.

public resetSession() : void
Return values
void

getSession()

Retrieves a widget related key/value pair from session data.

protected getSession([string $key = null ][, string $default = null ]) : string
Parameters
$key : string = null

Unique key for the data store.

$default : string = null

A default value to use when value is not found.

Return values
string

makeSessionId()

Returns a unique session identifier for this widget and controller action.

protected makeSessionId() : string
Return values
string

putSession()

Saves a widget related key/value pair in to session data.

protected putSession(string $key, string $value) : void
Parameters
$key : string

Unique key for the data store.

$value : string

The value to store.

Return values
void

Search results