MediaWiki REL1_39
MediaWiki\Parser\Parsoid\ParsoidOutputAccess Class Reference

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

Public Member Functions

 __construct (ServiceOptions $options, ParserCacheFactory $parserCacheFactory, RevisionLookup $revisionLookup, GlobalIdGenerator $globalIdGenerator, IBufferingStatsdDataFactory $stats, Parsoid $parsoid, SiteConfig $siteConfig, PageConfigFactory $parsoidPageConfigFactory)
 
 getParserOutput (PageRecord $page, ParserOptions $parserOpts, ?RevisionRecord $revision=null, int $options=0)
 
 getParsoidPageBundle (ParserOutput $parserOutput)
 Returns a Parsoid PageBundle equivalent to the given ParserOutput.
 
 getParsoidRenderID (ParserOutput $parserOutput)
 NOTE: This needs to be ParserOutput returned by ->getParserOutput() in this class.
 
 parse (PageRecord $page, ParserOptions $parserOpts, ?RevisionRecord $revision)
 
 supportsContentModel (string $model)
 

Public Attributes

const CONSTRUCTOR_OPTIONS
 

Protected Member Functions

 getCachedParserOutput (PageRecord $page, ParserOptions $parserOpts, ?RevisionRecord $revision, bool $isOld, string $statsKey)
 

Detailed Description

MediaWiki service for getting Parsoid Output objects.

Since
1.39
Stability: unstable

Definition at line 57 of file ParsoidOutputAccess.php.

Constructor & Destructor Documentation

◆ __construct()

MediaWiki\Parser\Parsoid\ParsoidOutputAccess::__construct ( ServiceOptions $options,
ParserCacheFactory $parserCacheFactory,
RevisionLookup $revisionLookup,
GlobalIdGenerator $globalIdGenerator,
IBufferingStatsdDataFactory $stats,
Parsoid $parsoid,
SiteConfig $siteConfig,
PageConfigFactory $parsoidPageConfigFactory )
Parameters
ServiceOptions$options
ParserCacheFactory$parserCacheFactory
RevisionLookup$revisionLookup
GlobalIdGenerator$globalIdGenerator
IBufferingStatsdDataFactory$stats
Parsoid$parsoid
SiteConfig$siteConfig
PageConfigFactory$parsoidPageConfigFactory

Definition at line 119 of file ParsoidOutputAccess.php.

References MediaWiki\Config\ServiceOptions\assertRequiredOptions(), MediaWiki\Config\ServiceOptions\get(), MediaWiki\Parser\ParserCacheFactory\getParserCache(), MediaWiki\Parser\ParserCacheFactory\getRevisionOutputCache(), and MediaWiki\MainConfigNames\ParsoidCacheConfig.

Member Function Documentation

◆ getCachedParserOutput()

MediaWiki\Parser\Parsoid\ParsoidOutputAccess::getCachedParserOutput ( PageRecord $page,
ParserOptions $parserOpts,
?RevisionRecord $revision,
bool $isOld,
string $statsKey )
protected
Parameters
PageRecord$page
ParserOptions$parserOpts
RevisionRecord | null$revision
bool$isOld
string$statsKey
Returns
?ParserOutput

Definition at line 340 of file ParsoidOutputAccess.php.

◆ getParserOutput()

MediaWiki\Parser\Parsoid\ParsoidOutputAccess::getParserOutput ( PageRecord $page,
ParserOptions $parserOpts,
?RevisionRecord $revision = null,
int $options = 0 )
Parameters
PageRecord$page
ParserOptions$parserOpts
?RevisionRecord$revision
int$optionsSee the OPT_XXX constants
Returns
Status<ParserOutput>

Definition at line 163 of file ParsoidOutputAccess.php.

◆ getParsoidPageBundle()

MediaWiki\Parser\Parsoid\ParsoidOutputAccess::getParsoidPageBundle ( ParserOutput $parserOutput)

Returns a Parsoid PageBundle equivalent to the given ParserOutput.

Parameters
ParserOutput$parserOutput
Returns
PageBundle

Definition at line 322 of file ParsoidOutputAccess.php.

◆ getParsoidRenderID()

MediaWiki\Parser\Parsoid\ParsoidOutputAccess::getParsoidRenderID ( ParserOutput $parserOutput)

NOTE: This needs to be ParserOutput returned by ->getParserOutput() in this class.

Parameters
ParserOutput$parserOutput
Returns
ParsoidRenderID

Definition at line 304 of file ParsoidOutputAccess.php.

◆ parse()

MediaWiki\Parser\Parsoid\ParsoidOutputAccess::parse ( PageRecord $page,
ParserOptions $parserOpts,
?RevisionRecord $revision )
Parameters
PageRecord$page
ParserOptions$parserOpts
RevisionRecord | null$revision
Returns
Status

Definition at line 378 of file ParsoidOutputAccess.php.

◆ supportsContentModel()

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

Definition at line 147 of file ParsoidOutputAccess.php.

Member Data Documentation

◆ CONSTRUCTOR_OPTIONS

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

Definition at line 77 of file ParsoidOutputAccess.php.


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