MediaWiki REL1_39
MediaWiki\Rest\Handler\ParsoidHTMLHelper Class Reference

Helper for getting output of a given wikitext page rendered by parsoid. More...

Public Member Functions

 __construct (ParsoidOutputStash $parsoidOutputStash, IBufferingStatsdDataFactory $statsDataFactory, ParsoidOutputAccess $parsoidOutputAccess)
 
 getETag (string $suffix='')
 Returns an ETag uniquely identifying the HTML output.
 
 getHtml ()
 
 getLastModified ()
 Returns the time at which the HTML was rendered.
 
 getParamSettings ()
 
 init (PageIdentity $page, array $parameters, User $user, ?RevisionRecord $revision=null, ?Language $pageLanguage=null)
 

Detailed Description

Helper for getting output of a given wikitext page rendered by parsoid.

Since
1.36
Stability: unstable
Pending consolidation of the Parsoid extension with core code. Part of this class should probably become a service.

Definition at line 49 of file ParsoidHTMLHelper.php.

Constructor & Destructor Documentation

◆ __construct()

MediaWiki\Rest\Handler\ParsoidHTMLHelper::__construct ( ParsoidOutputStash $parsoidOutputStash,
IBufferingStatsdDataFactory $statsDataFactory,
ParsoidOutputAccess $parsoidOutputAccess )
Parameters
ParsoidOutputStash$parsoidOutputStash
IBufferingStatsdDataFactory$statsDataFactory
ParsoidOutputAccess$parsoidOutputAccess

Definition at line 93 of file ParsoidHTMLHelper.php.

Member Function Documentation

◆ getETag()

MediaWiki\Rest\Handler\ParsoidHTMLHelper::getETag ( string $suffix = '')

Returns an ETag uniquely identifying the HTML output.

Parameters
string$suffixA suffix to attach to the etag.
Returns
string|null

Definition at line 170 of file ParsoidHTMLHelper.php.

◆ getHtml()

MediaWiki\Rest\Handler\ParsoidHTMLHelper::getHtml ( )
Returns
ParserOutput a tuple with html and content-type
Exceptions
LocalizedHttpException

Definition at line 129 of file ParsoidHTMLHelper.php.

◆ getLastModified()

MediaWiki\Rest\Handler\ParsoidHTMLHelper::getLastModified ( )

Returns the time at which the HTML was rendered.

Returns
string|null

Definition at line 189 of file ParsoidHTMLHelper.php.

◆ getParamSettings()

MediaWiki\Rest\Handler\ParsoidHTMLHelper::getParamSettings ( )
Returns
array

Definition at line 196 of file ParsoidHTMLHelper.php.

◆ init()

MediaWiki\Rest\Handler\ParsoidHTMLHelper::init ( PageIdentity $page,
array $parameters,
User $user,
?RevisionRecord $revision = null,
?Language $pageLanguage = null )
Parameters
PageIdentity$page
array$parameters
User$user
RevisionRecord | null$revision
Language | null$pageLanguage

Definition at line 110 of file ParsoidHTMLHelper.php.


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