MediaWiki master
MediaWiki\Session\SingleBackendSessionStore Class Reference

An implementation of a session store with a single backend for storing anonymous and authenticated sessions. More...

Inherits MediaWiki\Session\SessionStore.

Collaboration diagram for MediaWiki\Session\SingleBackendSessionStore:

Public Member Functions

 __construct (BagOStuff $store, LoggerInterface $logger, StatsFactory $statsFactory)
 
 delete (SessionInfo $info)
 Deletes session data from the session store for the provided key.
 
 get (SessionInfo $info)
 Get session store data for a given key.
 
 set (SessionInfo $info, $value, $exptime=0, $flags=0)
 Set session store data for the corresponding key to the active store during the request.
 
 setLogger (LoggerInterface $logger)
 
 shutdown ()
 Will be called during shutdown.
Returns
void

 

Detailed Description

An implementation of a session store with a single backend for storing anonymous and authenticated sessions.

Authenticated and anonymous sessions are treated the same in terms of their TTL.

Since
1.45

Definition at line 25 of file SingleBackendSessionStore.php.

Constructor & Destructor Documentation

◆ __construct()

MediaWiki\Session\SingleBackendSessionStore::__construct ( BagOStuff $store,
LoggerInterface $logger,
StatsFactory $statsFactory )

Member Function Documentation

◆ delete()

MediaWiki\Session\SingleBackendSessionStore::delete ( SessionInfo $info)

Deletes session data from the session store for the provided key.

Parameters
SessionInfo$info

Implements MediaWiki\Session\SessionStore.

Definition at line 97 of file SingleBackendSessionStore.php.

◆ get()

MediaWiki\Session\SingleBackendSessionStore::get ( SessionInfo $info)

Get session store data for a given key.

This will look up the active store during the request and use that to fetch the data.

Parameters
SessionInfo$info
Returns
mixed

Implements MediaWiki\Session\SessionStore.

Definition at line 56 of file SingleBackendSessionStore.php.

◆ set()

MediaWiki\Session\SingleBackendSessionStore::set ( SessionInfo $info,
$value,
$exptime = 0,
$flags = 0 )

Set session store data for the corresponding key to the active store during the request.

Parameters
SessionInfo$info
mixed$value
int$exptime
int$flags

Implements MediaWiki\Session\SessionStore.

Definition at line 80 of file SingleBackendSessionStore.php.

◆ setLogger()

MediaWiki\Session\SingleBackendSessionStore::setLogger ( LoggerInterface $logger)

◆ shutdown()

MediaWiki\Session\SingleBackendSessionStore::shutdown ( )

Will be called during shutdown.

Returns
void

Implements MediaWiki\Session\SessionStore.

Definition at line 110 of file SingleBackendSessionStore.php.

References wfTimestampNow().


The documentation for this class was generated from the following file: