MediaWiki REL1_30
DummySessionProvider.php
Go to the documentation of this file.
1<?php
6
13
14 const ID = 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa';
15
17 return new SessionInfo( SessionInfo::MIN_PRIORITY, [
18 'provider' => $this,
19 'id' => self::ID,
20 'persisted' => true,
21 'userInfo' => UserInfo::newAnonymous(),
22 ] );
23 }
24
25 public function newSessionInfo( $id = null ) {
26 return new SessionInfo( SessionInfo::MIN_PRIORITY, [
27 'id' => $id,
28 'idIsSafe' => true,
29 'provider' => $this,
30 'persisted' => false,
31 'userInfo' => UserInfo::newAnonymous(),
32 ] );
33 }
34
35 public function persistsSessionId() {
36 return true;
37 }
38
39 public function canChangeUser() {
40 return $this->persistsSessionId();
41 }
42
43 public function persistSession( SessionBackend $session, WebRequest $request ) {
44 }
45
47 }
48
49 public function immutableSessionCouldExistForUser( $user ) {
50 return false;
51 }
52
53 public function preventImmutableSessionsForUser( $user ) {
54 }
55
57 return $request->getCookie( 'UserName' );
58 }
59
60}
Dummy session provider.
persistsSessionId()
Indicate whether self::persistSession() can save arbitrary session IDs.
persistSession(SessionBackend $session, WebRequest $request)
Persist a session into a request/response.
newSessionInfo( $id=null)
Provide session info for a new, empty session.
provideSessionInfo(WebRequest $request)
Provide session info for a request.
canChangeUser()
Indicate whether the user associated with the request can be changed.
suggestLoginUsername(WebRequest $request)
Get a suggested username for the login form.
unpersistSession(WebRequest $request)
Remove any persisted session from a request/response.
This is the actual workhorse for Session.
Value object returned by SessionProvider.
A SessionProvider provides SessionInfo and support for Session.
Object holding data about a session's user.
Definition UserInfo.php:51
The WebRequest class encapsulates getting at data passed in the URL or via a POSTed form stripping il...
do that in ParserLimitReportFormat instead use this to modify the parameters of the image all existing parser cache entries will be invalid To avoid you ll need to handle that somehow(e.g. with the RejectParserCacheValue hook) because MediaWiki won 't do it for you. & $defaults also a ContextSource after deleting those rows but within the same transaction you ll probably need to make sure the header is varied on $request
Definition hooks.txt:2775