MediaWiki  master
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. More...
 
 getParsoidRenderID (ParserOutput $parserOutput)
 NOTE: This needs to be ParserOutput returned by ->getParserOutput() in this class. More...
 
 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 56 of file ParsoidOutputAccess.php.

Constructor & Destructor Documentation

◆ __construct()

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 118 of file ParsoidOutputAccess.php.

References Parser\ParserCacheFactory\getParserCache(), Parser\ParserCacheFactory\getRevisionOutputCache(), and MediaWiki\MainConfigNames\ParsoidCacheConfig.

Member Function Documentation

◆ getCachedParserOutput()

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 342 of file ParsoidOutputAccess.php.

◆ getParserOutput()

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>
Exceptions
LocalizedHttpException

Definition at line 163 of file ParsoidOutputAccess.php.

◆ getParsoidPageBundle()

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

Returns a Parsoid PageBundle equivalent to the given ParserOutput.

Parameters
ParserOutput$parserOutput
Returns
PageBundle

Definition at line 324 of file ParsoidOutputAccess.php.

◆ getParsoidRenderID()

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 306 of file ParsoidOutputAccess.php.

◆ supportsContentModel()

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

Definition at line 146 of file ParsoidOutputAccess.php.

Member Data Documentation

◆ CONSTRUCTOR_OPTIONS

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

Definition at line 76 of file ParsoidOutputAccess.php.


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