|
MediaWiki master
|
Class allowing easy storage and retrieval of EditResults associated with revisions. More...
Public Member Functions | |
| __construct (private readonly BagOStuff $mainObjectStash, private readonly IConnectionProvider $dbProvider, private readonly ServiceOptions $options,) | |
| get (int $revisionId) | |
| Get an EditResult for the given revision ID. | |
| set (int $revisionId, EditResult $editResult) | |
| Store the EditResult in the main object stash. | |
Public Attributes | |
| const | CONSTRUCTOR_OPTIONS |
Class allowing easy storage and retrieval of EditResults associated with revisions.
EditResults are stored in the main object stash and (depending on wiki's configuration) in revert change tags. This class stores the relevant data in the main stash. When asked to retrieve an EditResult for an edit and the requested key is not present in the main stash, the class will attempt to retrieve the EditResult from revert tags.
Definition at line 27 of file EditResultCache.php.
| MediaWiki\Storage\EditResultCache::__construct | ( | private readonly BagOStuff | $mainObjectStash, |
| private readonly IConnectionProvider | $dbProvider, | ||
| private readonly ServiceOptions | $options ) |
| BagOStuff | $mainObjectStash | Main object stash, see MediaWikiServices::getMainObjectStash() |
| IConnectionProvider | $dbProvider | |
| ServiceOptions | $options |
Definition at line 41 of file EditResultCache.php.
| MediaWiki\Storage\EditResultCache::get | ( | int | $revisionId | ) |
Get an EditResult for the given revision ID.
Will first attempt to get the EditResult from the main stash. If this fails, it will try to retrieve the EditResult from revert change tags of this revision.
| int | $revisionId |
Definition at line 77 of file EditResultCache.php.
| MediaWiki\Storage\EditResultCache::set | ( | int | $revisionId, |
| EditResult | $editResult ) |
Store the EditResult in the main object stash.
| int | $revisionId | |
| EditResult | $editResult |
Definition at line 57 of file EditResultCache.php.
| const MediaWiki\Storage\EditResultCache::CONSTRUCTOR_OPTIONS |
Definition at line 29 of file EditResultCache.php.