SessionMaker
Session Maker Trait
trait Backend\Traits\SessionMaker
Adds session management based methods to a controller class, or a class
that contains a $controller
property referencing a controller.
Methods
public resetSession () : void
Resets all session data related to this widget.
Returns
void
protected
getSession (string $key = null
, string $default = null
)
: string
Retrieves a widget related key/value pair from session data.
Parameters
Property | Type | Description |
---|---|---|
$key | string |
string
Unique key for the data store. |
$default | string |
string
A default value to use when value is not found. |
Returns
string
protected makeSessionId () : string
Returns a unique session identifier for this widget and controller action.
Returns
string
protected putSession (string $key, mixed $value) : void
Saves a widget related key/value pair in to session data.
Parameters
Property | Type | Description |
---|---|---|
$key | string |
string
Unique key for the data store. |
$value | mixed |
mixed
The value to store. |
Returns
void
Copyright © 2023 Winter CMS