MediaWiki master
MediaWiki\Session\SessionId Class Reference

Value object holding the session ID in a manner that can be globally updated. More...

Public Member Functions

 __construct ( $id)
 
 __toString ()
 
 getId ()
 
 setId ( $id)
 

Detailed Description

Value object holding the session ID in a manner that can be globally updated.

This class exists because we want WebRequest to refer to the session, but it can't hold the Session itself due to issues with circular references and it can't just hold the ID as a string because we need to be able to update the ID when SessionBackend::resetId() is called.

Stability: newable
Since
1.27

Definition at line 40 of file SessionId.php.

Constructor & Destructor Documentation

◆ __construct()

MediaWiki\Session\SessionId::__construct ( $id)
Stability: stable
to call
Parameters
string$id

Definition at line 49 of file SessionId.php.

Member Function Documentation

◆ __toString()

MediaWiki\Session\SessionId::__toString ( )

Definition at line 68 of file SessionId.php.

◆ getId()

MediaWiki\Session\SessionId::getId ( )
Returns
string

Definition at line 56 of file SessionId.php.

Referenced by MediaWiki\Session\SessionBackend\__construct().

◆ setId()

MediaWiki\Session\SessionId::setId ( $id)
Access: internal
For use by \MediaWiki\Session\SessionManager only
Parameters
string$id

Definition at line 64 of file SessionId.php.


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