MediaWiki
master
|
Service for getting rendered output of a given page. More...
Public Member Functions | |
__construct (ParserCache $primaryCache, RevisionOutputCache $secondaryCache, RevisionLookup $revisionLookup, RevisionRenderer $revisionRenderer, IBufferingStatsdDataFactory $statsDataFactory, ILBFactory $lbFactory, LoggerSpi $loggerSpi, WikiPageFactory $wikiPageFactory, TitleFormatter $titleFormatter) | |
getCachedParserOutput (PageRecord $page, ParserOptions $parserOptions, ?RevisionRecord $revision=null, int $options=0) | |
Returns the rendered output for the given page if it is present in the cache. More... | |
getParserOutput (PageRecord $page, ParserOptions $parserOptions, ?RevisionRecord $revision=null, int $options=0) | |
Returns the rendered output for the given page. More... | |
Private Member Functions | |
checkPreconditions (PageRecord $page, ?RevisionRecord $revision=null, int $options=0) | |
newPoolWorkArticleView (PageRecord $page, ParserOptions $parserOptions, RevisionRecord $revision, int $options) | |
shouldUseCache (PageRecord $page, ?RevisionRecord $rev) | |
Use a cache? More... | |
Private Attributes | |
ILBFactory | $lbFactory |
ParserOutput[] | $localCache = [] |
In cases that an extension tries to get the same ParserOutput of the page right after it was parsed (T301310). More... | |
LoggerSpi | $loggerSpi |
ParserCache | $primaryCache |
RevisionLookup | $revisionLookup |
RevisionRenderer | $revisionRenderer |
RevisionOutputCache | $secondaryCache |
IBufferingStatsdDataFactory | $statsDataFactory |
TitleFormatter | $titleFormatter |
WikiPageFactory | $wikiPageFactory |
Service for getting rendered output of a given page.
This is a high level service, encapsulating concerns like caching and stampede protection via PoolCounter.
Definition at line 50 of file ParserOutputAccess.php.
Page\ParserOutputAccess::__construct | ( | ParserCache | $primaryCache, |
RevisionOutputCache | $secondaryCache, | ||
RevisionLookup | $revisionLookup, | ||
RevisionRenderer | $revisionRenderer, | ||
IBufferingStatsdDataFactory | $statsDataFactory, | ||
ILBFactory | $lbFactory, | ||
LoggerSpi | $loggerSpi, | ||
WikiPageFactory | $wikiPageFactory, | ||
TitleFormatter | $titleFormatter | ||
) |
ParserCache | $primaryCache | |
RevisionOutputCache | $secondaryCache | |
RevisionLookup | $revisionLookup | |
RevisionRenderer | $revisionRenderer | |
IBufferingStatsdDataFactory | $statsDataFactory | |
ILBFactory | $lbFactory | |
LoggerSpi | $loggerSpi | |
WikiPageFactory | $wikiPageFactory | |
TitleFormatter | $titleFormatter |
Definition at line 134 of file ParserOutputAccess.php.
References Page\ParserOutputAccess\$lbFactory, Page\ParserOutputAccess\$loggerSpi, Page\ParserOutputAccess\$primaryCache, Page\ParserOutputAccess\$revisionLookup, Page\ParserOutputAccess\$revisionRenderer, Page\ParserOutputAccess\$secondaryCache, Page\ParserOutputAccess\$statsDataFactory, Page\ParserOutputAccess\$titleFormatter, and Page\ParserOutputAccess\$wikiPageFactory.
|
private |
PageRecord | $page | |
RevisionRecord | null | $revision | |
int | $options |
Definition at line 326 of file ParserOutputAccess.php.
References StatusValue\newFatal().
Page\ParserOutputAccess::getCachedParserOutput | ( | PageRecord | $page, |
ParserOptions | $parserOptions, | ||
?RevisionRecord | $revision = null , |
||
int | $options = 0 |
||
) |
Returns the rendered output for the given page if it is present in the cache.
PageRecord | $page | |
ParserOptions | $parserOptions | |
RevisionRecord | null | $revision | |
int | $options | Bitfield using the OPT_XXX constants |
Definition at line 205 of file ParserOutputAccess.php.
Page\ParserOutputAccess::getParserOutput | ( | PageRecord | $page, |
ParserOptions | $parserOptions, | ||
?RevisionRecord | $revision = null , |
||
int | $options = 0 |
||
) |
Returns the rendered output for the given page.
Caching and concurrency control is applied.
PageRecord | $page | |
ParserOptions | $parserOptions | |
RevisionRecord | null | $revision | |
int | $options | Bitfield using the OPT_XXX constants |
Definition at line 261 of file ParserOutputAccess.php.
|
private |
PageRecord | $page | |
ParserOptions | $parserOptions | |
RevisionRecord | $revision | |
int | $options |
Definition at line 371 of file ParserOutputAccess.php.
|
private |
Use a cache?
PageRecord | $page | |
RevisionRecord | null | $rev |
Definition at line 164 of file ParserOutputAccess.php.
References CACHE_NONE, MediaWiki\Revision\RevisionRecord\DELETED_TEXT, Page\PageIdentity\exists(), MediaWiki\Revision\RevisionRecord\FOR_PUBLIC, and Page\PageRecord\getLatest().
|
private |
Definition at line 112 of file ParserOutputAccess.php.
Referenced by Page\ParserOutputAccess\__construct().
|
private |
In cases that an extension tries to get the same ParserOutput of the page right after it was parsed (T301310).
Definition at line 100 of file ParserOutputAccess.php.
|
private |
Definition at line 115 of file ParserOutputAccess.php.
Referenced by Page\ParserOutputAccess\__construct().
|
private |
Definition at line 88 of file ParserOutputAccess.php.
Referenced by Page\ParserOutputAccess\__construct().
|
private |
Definition at line 103 of file ParserOutputAccess.php.
Referenced by Page\ParserOutputAccess\__construct().
|
private |
Definition at line 106 of file ParserOutputAccess.php.
Referenced by Page\ParserOutputAccess\__construct().
|
private |
Definition at line 93 of file ParserOutputAccess.php.
Referenced by Page\ParserOutputAccess\__construct().
|
private |
Definition at line 109 of file ParserOutputAccess.php.
Referenced by Page\ParserOutputAccess\__construct().
|
private |
Definition at line 121 of file ParserOutputAccess.php.
Referenced by Page\ParserOutputAccess\__construct().
|
private |
Definition at line 118 of file ParserOutputAccess.php.
Referenced by Page\ParserOutputAccess\__construct().