SessionKeepAlive
extends AbstractAction
in package
Class SessionKeepAlive
Table of Contents
- CONFIG_KEY_KEEP_ALIVE = 'configuration/SESSION_KEEP_ALIVE'
- DEFAULT_SERVER_SESSION_LIFETIME = 1440
- MILLISECONDS_MULTIPLIER = 1000
- TIMEOUT_ADJUSTMENT_MILLISECONDS = 500
- $textManager : TextManager
- $url : Url
- $configurationService : ConfigurationService
- __construct() : mixed
- SessionKeepAlive constructor.
- __invoke() : Response
- This method will be called in order to process the incoming request.
- handle() : Response
- Executes the business logic of the incoming request.
- initAbstractAction() : void
- Module action initialization.
- translate() : string
- Translates the section phrase.
- getServerSessionLifetime() : int
- Returns the server session lifetime in seconds.
- getSessionLifetime() : int
- Returns the session lifetime in milliseconds.
- shouldKeepAlive() : bool
- Checks if session should be kept alive.
Constants
CONFIG_KEY_KEEP_ALIVE
private
mixed
CONFIG_KEY_KEEP_ALIVE
= 'configuration/SESSION_KEEP_ALIVE'
DEFAULT_SERVER_SESSION_LIFETIME
private
mixed
DEFAULT_SERVER_SESSION_LIFETIME
= 1440
MILLISECONDS_MULTIPLIER
private
mixed
MILLISECONDS_MULTIPLIER
= 1000
TIMEOUT_ADJUSTMENT_MILLISECONDS
private
mixed
TIMEOUT_ADJUSTMENT_MILLISECONDS
= 500
Properties
$textManager
protected
TextManager
$textManager
$url
protected
Url
$url
$configurationService
private
ConfigurationService
$configurationService
Methods
__construct()
SessionKeepAlive constructor.
public
__construct(ConfigurationService $configurationService) : mixed
Parameters
- $configurationService : ConfigurationService
Return values
mixed —__invoke()
This method will be called in order to process the incoming request.
public
__invoke(Request $request, Response $response) : Response
Parameters
Return values
Response —handle()
Executes the business logic of the incoming request.
public
handle(Request $request, Response $response) : Response
Parameters
Tags
Return values
Response —initAbstractAction()
Module action initialization.
public
initAbstractAction(Url $url, TextManager $textManager) : void
Parameters
- $url : Url
- $textManager : TextManager
Return values
void —translate()
Translates the section phrase.
protected
translate(string $phrase, string $section[, int|null $languageId = null ]) : string
Parameters
- $phrase : string
- $section : string
- $languageId : int|null = null
Return values
string —getServerSessionLifetime()
Returns the server session lifetime in seconds.
private
getServerSessionLifetime() : int
Return values
int —getSessionLifetime()
Returns the session lifetime in milliseconds.
private
getSessionLifetime() : int
Return values
int —shouldKeepAlive()
Checks if session should be kept alive.
private
shouldKeepAlive() : bool