Page MenuHomeWickedGov Phorge

SessionId.php
No OneTemporary

Size
1015 B
Referenced Files
None
Subscribers
None

SessionId.php

<?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

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)

Event Timeline