MediaWiki master
MediaWiki\Parser\Parsoid\ParsoidOutputAccess Class Reference

MediaWiki service for getting rendered page content. More...

Public Member Functions

 __construct (ParsoidParserFactory $parsoidParserFactory, ParserOutputAccess $parserOutputAccess, PageLookup $pageLookup, RevisionLookup $revisionLookup, SiteConfig $siteConfig, IContentHandlerFactory $contentHandlerFactory)
 
 getCachedParserOutput (PageIdentity $page, ParserOptions $parserOpts, $revision=null, bool $lenientRevHandling=false)
 
 getParserOutput (PageIdentity $page, ParserOptions $parserOpts, $revision=null, int $options=0, bool $lenientRevHandling=false)
 
 parseUncacheable (PageIdentity $page, ParserOptions $parserOpts, $revision, bool $lenientRevHandling=false)
 This is to be called only for parsing posted wikitext that is actually not part of any real revision.
 

Detailed Description

MediaWiki service for getting rendered page content.

This is very similar to ParserOutputAccess and only exists as a separate class as an interim solution and should be removed soon.

It is different from ParserOutputAccess in two aspects:

  • it forces Parsoid to be used when possible
  • it supports on-the-fly parsing through parseUncacheable()
Since
1.39
Stability: unstable
Deprecated
since 1.43

Definition at line 52 of file ParsoidOutputAccess.php.

Constructor & Destructor Documentation

◆ __construct()

MediaWiki\Parser\Parsoid\ParsoidOutputAccess::__construct ( ParsoidParserFactory $parsoidParserFactory,
ParserOutputAccess $parserOutputAccess,
PageLookup $pageLookup,
RevisionLookup $revisionLookup,
SiteConfig $siteConfig,
IContentHandlerFactory $contentHandlerFactory )
Parameters
ParsoidParserFactory$parsoidParserFactory
ParserOutputAccess$parserOutputAccess
PageLookup$pageLookup
RevisionLookup$revisionLookup
SiteConfig$siteConfig
IContentHandlerFactory$contentHandlerFactory

Definition at line 68 of file ParsoidOutputAccess.php.

Member Function Documentation

◆ getCachedParserOutput()

MediaWiki\Parser\Parsoid\ParsoidOutputAccess::getCachedParserOutput ( PageIdentity $page,
ParserOptions $parserOpts,
$revision = null,
bool $lenientRevHandling = false )
Parameters
PageIdentity$page
ParserOptions$parserOpts
RevisionRecord | int | null$revision
bool$lenientRevHandling
Returns
?ParserOutput
Deprecated
since 1.43

Definition at line 130 of file ParsoidOutputAccess.php.

◆ getParserOutput()

MediaWiki\Parser\Parsoid\ParsoidOutputAccess::getParserOutput ( PageIdentity $page,
ParserOptions $parserOpts,
$revision = null,
int $options = 0,
bool $lenientRevHandling = false )
Parameters
PageIdentity$page
ParserOptions$parserOpts
RevisionRecord | int | null$revision
int$optionsSee the OPT_XXX constants
bool$lenientRevHandling
Returns
Status<ParserOutput>
Deprecated
since 1.43

Definition at line 94 of file ParsoidOutputAccess.php.

◆ parseUncacheable()

MediaWiki\Parser\Parsoid\ParsoidOutputAccess::parseUncacheable ( PageIdentity $page,
ParserOptions $parserOpts,
$revision,
bool $lenientRevHandling = false )

This is to be called only for parsing posted wikitext that is actually not part of any real revision.

Parameters
PageIdentity$page
ParserOptions$parserOpts
RevisionRecord | int | null$revision
bool$lenientRevHandling
Returns
Status
Deprecated
since 1.43

Definition at line 155 of file ParsoidOutputAccess.php.


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