|
MediaWiki master
|
MediaWiki\Session entry point interface. More...
Inherits LoggerAwareInterface.
Inherited by MediaWiki\Session\SessionManager.

Public Member Functions | |
| getEmptySession (?WebRequest $request=null) | |
| Create a new, empty session. | |
| getSessionById ( $id, $create=false, ?WebRequest $request=null) | |
| Fetch a session by ID. | |
| getSessionForRequest (WebRequest $request) | |
| Fetch the session for a request (or a new empty session if none is attached to it) | |
| getVaryCookies () | |
| Return the list of cookies that need varying on. | |
| getVaryHeaders () | |
| Return the HTTP headers that need varying on. | |
| invalidateSessionsForUser (User $user) | |
| Invalidate sessions for a user. | |
MediaWiki\Session entry point interface.
This exists to make IDEs happy, so they don't see the internal-but-required-to-be-public methods on SessionManager.
Definition at line 22 of file SessionManagerInterface.php.
| MediaWiki\Session\SessionManagerInterface::getEmptySession | ( | ?WebRequest | $request = null | ) |
Create a new, empty session.
The first provider configured that is able to provide an empty session will be used.
| WebRequest | null | $request | Corresponding request. Any existing session associated with this WebRequest object will be overwritten. |
Implemented in MediaWiki\Session\SessionManager.
| MediaWiki\Session\SessionManagerInterface::getSessionById | ( | $id, | |
| $create = false, | |||
| ?WebRequest | $request = null ) |
Fetch a session by ID.
| string | $id | |
| bool | $create | If no session exists for $id, try to create a new one. May still return null if a session for $id exists but cannot be loaded. |
| WebRequest | null | $request | Corresponding request. Any existing session associated with this WebRequest object will be overwritten. |
Implemented in MediaWiki\Session\SessionManager.
| MediaWiki\Session\SessionManagerInterface::getSessionForRequest | ( | WebRequest | $request | ) |
Fetch the session for a request (or a new empty session if none is attached to it)
| WebRequest | $request | Any existing associated session will be reset to the session corresponding to the data in the request itself. |
\OverflowException if there are multiple sessions tied for top priority in the request. Exception has a property "sessionInfos" holding the SessionInfo objects for the sessions involved.
Implemented in MediaWiki\Session\SessionManager.
| MediaWiki\Session\SessionManagerInterface::getVaryCookies | ( | ) |
Return the list of cookies that need varying on.
Implemented in MediaWiki\Session\SessionManager.
| MediaWiki\Session\SessionManagerInterface::getVaryHeaders | ( | ) |
Return the HTTP headers that need varying on.
The return value is such that someone could theoretically do this:
Implemented in MediaWiki\Session\SessionManager.
| MediaWiki\Session\SessionManagerInterface::invalidateSessionsForUser | ( | User | $user | ) |
Invalidate sessions for a user.
After calling this, existing sessions should be invalid. For mutable session providers, this generally means the user has to log in again; for immutable providers, it generally means the loss of session data.
Implemented in MediaWiki\Session\SessionManager.