MediaWiki  master
Parser\Parsoid\ParsoidOutputAccess Class Reference

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

Public Member Functions

 __construct (ServiceOptions $options, ParserCacheFactory $parserCacheFactory, PageLookup $pageLookup, RevisionLookup $revisionLookup, GlobalIdGenerator $globalIdGenerator, IBufferingStatsdDataFactory $stats, Parsoid $parsoid, SiteConfig $siteConfig, PageConfigFactory $parsoidPageConfigFactory)
 
 getCachedParserOutput (PageIdentity $page, ParserOptions $parserOpts, $revision=null)
 
 getParserOutput (PageIdentity $page, ParserOptions $parserOpts, $revision=null, int $options=0)
 
 getParsoidRenderID (ParserOutput $parserOutput)
 NOTE: This needs to be ParserOutput returned by ->getParserOutput() in this class. More...
 
 parse (PageIdentity $page, ParserOptions $parserOpts, array $envOptions, $revision)
 
 supportsContentModel (string $model)
 

Public Attributes

const CONSTRUCTOR_OPTIONS
 

Protected Member Functions

 getCachedParserOutputInternal (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()

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

Definition at line 125 of file ParsoidOutputAccess.php.

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

Member Function Documentation

◆ getCachedParserOutput()

Parser\Parsoid\ParsoidOutputAccess::getCachedParserOutput ( PageIdentity  $page,
ParserOptions  $parserOpts,
  $revision = null 
)
Parameters
PageIdentity$page
ParserOptions$parserOpts
RevisionRecord | int | null$revision
Returns
?ParserOutput

Definition at line 314 of file ParsoidOutputAccess.php.

◆ getCachedParserOutputInternal()

Parser\Parsoid\ParsoidOutputAccess::getCachedParserOutputInternal ( 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 ( PageIdentity  $page,
ParserOptions  $parserOpts,
  $revision = null,
int  $options = 0 
)
Parameters
PageIdentity$page
ParserOptions$parserOpts
RevisionRecord | int | null$revision
int$optionsSee the OPT_XXX constants
Returns
Status<ParserOutput>

Definition at line 178 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 296 of file ParsoidOutputAccess.php.

◆ parse()

Parser\Parsoid\ParsoidOutputAccess::parse ( PageIdentity  $page,
ParserOptions  $parserOpts,
array  $envOptions,
  $revision 
)
Parameters
PageIdentity$page
ParserOptions$parserOpts
array$envOptions
RevisionRecord | int | null$revision
Returns
Status

Definition at line 382 of file ParsoidOutputAccess.php.

◆ supportsContentModel()

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

Definition at line 162 of file ParsoidOutputAccess.php.

Member Data Documentation

◆ CONSTRUCTOR_OPTIONS

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

Definition at line 72 of file ParsoidOutputAccess.php.


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