Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F6044355
SessionId.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1015 B
Referenced Files
None
Subscribers
None
SessionId.php
View Options
<?php
/**
* @license GPL-2.0-or-later
* @file
*/
namespace
MediaWiki\Session
;
use
Stringable
;
/**
* 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.
*
* @newable
* @since 1.27
* @ingroup Session
*/
final
class
SessionId
implements
Stringable
{
/** @var string */
private
$id
;
/**
* @stable to call
*
* @param string $id
*/
public
function
__construct
(
$id
)
{
$this
->
id
=
$id
;
}
/**
* @return string
*/
public
function
getId
()
{
return
$this
->
id
;
}
/**
* @internal For use by \MediaWiki\Session\SessionManager only
* @param string $id
*/
public
function
setId
(
$id
)
{
$this
->
id
=
$id
;
}
public
function
__toString
()
{
return
$this
->
id
;
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Oct 4 2026, 21:24 (5 w, 5 d ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
70/28/c2609b1f88e323d3f779024e3fbe
Default Alt Text
SessionId.php (1015 B)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment