MediaWiki 1.42.1
|
Service for getting rendered output of a given page. More...
Public Member Functions | |
__construct (ParserCacheFactory $parserCacheFactory, RevisionLookup $revisionLookup, RevisionRenderer $revisionRenderer, IBufferingStatsdDataFactory $statsDataFactory, ILBFactory $lbFactory, ChronologyProtector $chronologyProtector, 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. | |
getParserOutput (PageRecord $page, ParserOptions $parserOptions, ?RevisionRecord $revision=null, int $options=0) | |
Returns the rendered output for the given page. | |
Public Attributes | |
const | OPT_FOR_ARTICLE_VIEW = 16 |
Apply page view semantics. | |
const | PARSOID_PCACHE_NAME = 'parsoid-' . ParserCacheFactory::DEFAULT_NAME |
const | PARSOID_RCACHE_NAME = 'parsoid-' . ParserCacheFactory::DEFAULT_RCACHE_NAME |
Protected Member Functions | |
newPoolWorkArticleView (PageRecord $page, ParserOptions $parserOptions, RevisionRecord $revision, int $options) | |
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 53 of file ParserOutputAccess.php.
MediaWiki\Page\ParserOutputAccess::__construct | ( | ParserCacheFactory | $parserCacheFactory, |
RevisionLookup | $revisionLookup, | ||
RevisionRenderer | $revisionRenderer, | ||
IBufferingStatsdDataFactory | $statsDataFactory, | ||
ILBFactory | $lbFactory, | ||
ChronologyProtector | $chronologyProtector, | ||
LoggerSpi | $loggerSpi, | ||
WikiPageFactory | $wikiPageFactory, | ||
TitleFormatter | $titleFormatter ) |
ParserCacheFactory | $parserCacheFactory | |
RevisionLookup | $revisionLookup | |
RevisionRenderer | $revisionRenderer | |
IBufferingStatsdDataFactory | $statsDataFactory | |
ILBFactory | $lbFactory | |
ChronologyProtector | $chronologyProtector | |
LoggerSpi | $loggerSpi | |
WikiPageFactory | $wikiPageFactory | |
TitleFormatter | $titleFormatter |
Definition at line 158 of file ParserOutputAccess.php.
MediaWiki\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 231 of file ParserOutputAccess.php.
MediaWiki\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 289 of file ParserOutputAccess.php.
|
protected |
PageRecord | $page | |
ParserOptions | $parserOptions | |
RevisionRecord | $revision | |
int | $options |
Definition at line 453 of file ParserOutputAccess.php.
References MediaWiki\Revision\RevisionRecord\getId().
const MediaWiki\Page\ParserOutputAccess::OPT_FOR_ARTICLE_VIEW = 16 |
Apply page view semantics.
This relaxes some guarantees, specifically:
Definition at line 105 of file ParserOutputAccess.php.
const MediaWiki\Page\ParserOutputAccess::PARSOID_PCACHE_NAME = 'parsoid-' . ParserCacheFactory::DEFAULT_NAME |
Definition at line 56 of file ParserOutputAccess.php.
const MediaWiki\Page\ParserOutputAccess::PARSOID_RCACHE_NAME = 'parsoid-' . ParserCacheFactory::DEFAULT_RCACHE_NAME |
Definition at line 59 of file ParserOutputAccess.php.