Backend\Traits\SessionMaker

Source: ~/modules/backend/traits/SessionMaker.php

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 void resetSession()

Resets all session data related to this widget.

Protected methods

protected string getSession(string $key=NULL, string $default=NULL)

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

Parameters
  • string $key - Unique key for the data store.
  • string $default - A default value to use when value is not found.

protected string makeSessionId()

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

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

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

Parameters
  • string $key - Unique key for the data store.
  • string $value - The value to store.