Backend\Traits\SessionMaker
Overview
Session Maker Trait
Adds session management based methods to a controller class, or a class
that contains a $controller property referencing a controller.
Public Methods
public resetSession()
public resetSession(): void
Resets all session data related to this widget.
Protected Methods
protected getSession()
protected getSession(
string $key = null,
string $default = null
): string
Retrieves a widget related key/value pair from session data.
protected makeSessionId()
protected makeSessionId(): string
Returns a unique session identifier for this widget and controller action.
protected putSession()
protected putSession(string $key, string $value): void
Saves a widget related key/value pair in to session data.
protected readSessionStore()
protected readSessionStore($sessionId): array<string,
Reads the widget session store, preferring JSON and falling back to the legacy base64+serialize format for sessions written before the format change. Legacy values are deserialized with allowed_classes set to false so deserialization cannot instantiate gadget chains.