MediaWiki REL1_40
MediaWiki\Edit\SimpleParsoidOutputStash Class Reference

Inherits MediaWiki\Edit\ParsoidOutputStash.

Collaboration diagram for MediaWiki\Edit\SimpleParsoidOutputStash:

Public Member Functions

 __construct (IContentHandlerFactory $contentHandlerFactory, BagOStuff $bagOfStuff, int $duration)
 
 get (ParsoidRenderID $renderId)
 This will decode the JSON data and create a page bundle from it if we have something in the stash that matches a given rendering or will just return an empty array if no entry in the stash.
 
 set (ParsoidRenderID $renderId, SelserContext $selserContext)
 Before we stash, we serialize & encode into JSON the relevant parts of the data we need to construct a page bundle in the future.
 

Detailed Description

Access: internal
Since
1.39

Definition at line 14 of file SimpleParsoidOutputStash.php.

Constructor & Destructor Documentation

◆ __construct()

MediaWiki\Edit\SimpleParsoidOutputStash::__construct ( IContentHandlerFactory $contentHandlerFactory,
BagOStuff $bagOfStuff,
int $duration )
Parameters
IContentHandlerFactory$contentHandlerFactory
BagOStuff$bagOfStuffstorage backend
int$durationcache duration in seconds

Definition at line 31 of file SimpleParsoidOutputStash.php.

Member Function Documentation

◆ get()

MediaWiki\Edit\SimpleParsoidOutputStash::get ( ParsoidRenderID $renderId)

This will decode the JSON data and create a page bundle from it if we have something in the stash that matches a given rendering or will just return an empty array if no entry in the stash.

Parameters
ParsoidRenderID$renderId
Returns
SelserContext|null

Implements MediaWiki\Edit\ParsoidOutputStash.

Definition at line 66 of file SimpleParsoidOutputStash.php.

◆ set()

MediaWiki\Edit\SimpleParsoidOutputStash::set ( ParsoidRenderID $renderId,
SelserContext $selserContext )

Before we stash, we serialize & encode into JSON the relevant parts of the data we need to construct a page bundle in the future.

Parameters
ParsoidRenderID$renderIdCombination of revision ID and revision's time ID
SelserContext$selserContext
Returns
bool

Implements MediaWiki\Edit\ParsoidOutputStash.

Definition at line 50 of file SimpleParsoidOutputStash.php.


The documentation for this class was generated from the following file: