MediaWiki master
MediaWiki\Parser\Parsoid\ParsoidOutputAccess Class Reference

MediaWiki service for getting Parsoid Output objects. More...

Public Member Functions

 __construct (ServiceOptions $options, 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)
 
 getParsoidRenderID (ParserOutput $parserOutput)
 
 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.
 
 supportsContentModel (string $model)
 

Public Attributes

const CONSTRUCTOR_OPTIONS
 

Detailed Description

MediaWiki service for getting Parsoid Output objects.

Since
1.39
Stability: unstable

Definition at line 47 of file ParsoidOutputAccess.php.

Constructor & Destructor Documentation

◆ __construct()

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

Definition at line 77 of file ParsoidOutputAccess.php.

References MediaWiki\Config\ServiceOptions\assertRequiredOptions(), and MediaWiki\Config\ServiceOptions\get().

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

Definition at line 215 of file ParsoidOutputAccess.php.

References ParserOptions\setUseParsoid().

◆ 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>

Definition at line 174 of file ParsoidOutputAccess.php.

◆ getParsoidRenderID()

MediaWiki\Parser\Parsoid\ParsoidOutputAccess::getParsoidRenderID ( ParserOutput  $parserOutput)
Access: internal
Parameters
ParserOutput$parserOutput
Returns
ParsoidRenderID

Definition at line 135 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

Definition at line 264 of file ParsoidOutputAccess.php.

◆ supportsContentModel()

MediaWiki\Parser\Parsoid\ParsoidOutputAccess::supportsContentModel ( string  $model)
Parameters
string$model
Returns
bool

Definition at line 107 of file ParsoidOutputAccess.php.

Member Data Documentation

◆ CONSTRUCTOR_OPTIONS

const MediaWiki\Parser\Parsoid\ParsoidOutputAccess::CONSTRUCTOR_OPTIONS
Initial value:
= [
'ParsoidWikiID'
]
const ParsoidCacheConfig
Name constant for the ParsoidCacheConfig setting, for use with Config::get()

Definition at line 54 of file ParsoidOutputAccess.php.


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