MediaWiki master
InstallerSessionProvider.php
Go to the documentation of this file.
1<?php
26namespace MediaWiki\Installer;
27
32
39 public function provideSessionInfo( WebRequest $request ) {
40 return new SessionInfo( 1, [
41 'provider' => $this,
42 'id' => str_repeat( 'x', 32 ),
43 ] );
44 }
45
50 public function persistsSessionId() {
51 return true;
52 }
53
58 public function canChangeUser() {
59 return true;
60 }
61
62 public function persistSession( SessionBackend $session, WebRequest $request ) {
63 }
64
65 public function unpersistSession( WebRequest $request ) {
66 }
67}
canChangeUser()
Sure, you can be whoever you want, as long as you have ID 0.
persistSession(SessionBackend $session, WebRequest $request)
Persist a session into a request/response.
persistsSessionId()
Yes we will treat your data with great care!
provideSessionInfo(WebRequest $request)
Pretend there is a session, to avoid MWCryptRand overhead.
unpersistSession(WebRequest $request)
Remove any persisted session from a request/response.
The WebRequest class encapsulates getting at data passed in the URL or via a POSTed form stripping il...
This is the actual workhorse for Session.
Value object returned by SessionProvider.
A SessionProvider provides SessionInfo and support for Session.