MediaWiki master
InstallerSessionProvider.php
Go to the documentation of this file.
1<?php
11
12namespace MediaWiki\Installer;
13
14use MediaWiki\Request\WebRequest;
15use MediaWiki\Session\SessionBackend;
16use MediaWiki\Session\SessionInfo;
17use MediaWiki\Session\SessionProvider;
18
26 return new SessionInfo( 1, [
27 'provider' => $this,
28 'id' => str_repeat( 'x', 32 ),
29 ] );
30 }
31
36 public function persistsSessionId() {
37 return true;
38 }
39
44 public function canChangeUser() {
45 return true;
46 }
47
48 public function persistSession( SessionBackend $session, WebRequest $request ) {
49 }
50
52 }
53}
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,...
This is the actual workhorse for Session.
Immutable value object returned by SessionProvider.
A SessionProvider provides SessionInfo and support for Session.