|
MediaWiki master
|
Adapter for PHP's session handling. More...
Inherits SessionHandlerInterface.

Public Member Functions | |
| close () | |
| Close the session (handler) | |
| destroy ( $id) | |
| Destroy a session. | |
| gc ( $maxlifetime) | |
| Execute garbage collection. | |
| open ( $save_path, $session_name) | |
| Initialize the session (handler) | |
| read ( $id) | |
| Read session data. | |
| setManager (SessionManagerInterface $manager, LoggerInterface $logger) | |
| write ( $id, $dataStr) | |
| Write session data. | |
Static Public Member Functions | |
| static | install (SessionManagerInterface $manager) |
| Install a session handler for the current web request. | |
| static | isEnabled () |
| Test whether the handler is installed and enabled. | |
| static | isInstalled () |
| Test whether the handler is installed. | |
Protected Member Functions | |
| __construct (SessionManagerInterface $manager) | |
Protected Attributes | |
| bool | $enable = false |
| Whether PHP session handling is enabled. | |
| LoggerInterface | $logger |
| SessionManagerInterface | $manager = null |
| array | $sessionFieldCache = [] |
| Track original session fields for later modification check. | |
| bool | $warn = true |
Static Protected Attributes | |
| static PHPSessionHandler | $instance = null |
Adapter for PHP's session handling.
Definition at line 23 of file PHPSessionHandler.php.
|
protected |
Definition at line 39 of file PHPSessionHandler.php.
References MediaWiki\Session\PHPSessionHandler\$manager, MediaWiki\MediaWikiServices\getInstance(), and MediaWiki\MainConfigNames\PHPSessionHandling.
| MediaWiki\Session\PHPSessionHandler::close | ( | ) |
Close the session (handler)
Definition at line 190 of file PHPSessionHandler.php.
| MediaWiki\Session\PHPSessionHandler::destroy | ( | $id | ) |
Destroy a session.
| string | $id | Session id |
Definition at line 373 of file PHPSessionHandler.php.
| MediaWiki\Session\PHPSessionHandler::gc | ( | $maxlifetime | ) |
Execute garbage collection.
| int | $maxlifetime | Maximum session life time (ignored) |
Definition at line 395 of file PHPSessionHandler.php.
|
static |
Install a session handler for the current web request.
Definition at line 94 of file PHPSessionHandler.php.
References MediaWiki\Session\PHPSessionHandler\$manager.
|
static |
Test whether the handler is installed and enabled.
Definition at line 87 of file PHPSessionHandler.php.
Referenced by MediaWiki\Session\SessionBackend\resetId(), and MediaWiki\Session\SessionBackend\unpersist().
|
static |
Test whether the handler is installed.
Definition at line 79 of file PHPSessionHandler.php.
References MediaWiki\Session\PHPSessionHandler\$instance.
| MediaWiki\Session\PHPSessionHandler::open | ( | $save_path, | |
| $session_name ) |
Initialize the session (handler)
| string | $save_path | Path used to store session files (ignored) |
| string | $session_name | Session name (ignored) |
Definition at line 174 of file PHPSessionHandler.php.
| MediaWiki\Session\PHPSessionHandler::read | ( | $id | ) |
Read session data.
| string | $id | Session id |
Definition at line 205 of file PHPSessionHandler.php.
| MediaWiki\Session\PHPSessionHandler::setManager | ( | SessionManagerInterface | $manager, |
| LoggerInterface | $logger ) |
| SessionManagerInterface | $manager | |
| LoggerInterface | $logger |
Definition at line 152 of file PHPSessionHandler.php.
Referenced by MediaWiki\Session\SessionManager\setupPHPSessionHandler().
| MediaWiki\Session\PHPSessionHandler::write | ( | $id, | |
| $dataStr ) |
Write session data.
| string | $id | Session id |
| string | $dataStr | Session data. Not that you should ever call this directly, but note that this has the same issues with code injection via user-controlled data as does PHP's unserialize function. |
Definition at line 254 of file PHPSessionHandler.php.
References wfDeprecated().
|
protected |
Whether PHP session handling is enabled.
Definition at line 28 of file PHPSessionHandler.php.
|
staticprotected |
Definition at line 25 of file PHPSessionHandler.php.
Referenced by MediaWiki\Session\PHPSessionHandler\isInstalled().
|
protected |
Definition at line 34 of file PHPSessionHandler.php.
|
protected |
Definition at line 33 of file PHPSessionHandler.php.
Referenced by MediaWiki\Session\PHPSessionHandler\__construct(), and MediaWiki\Session\PHPSessionHandler\install().
|
protected |
Track original session fields for later modification check.
Definition at line 37 of file PHPSessionHandler.php.
|
protected |
Definition at line 31 of file PHPSessionHandler.php.