MediaWiki master
|
Service for getting rendered output of a given page. More...
Public Member Functions | |
__construct (ParserCacheFactory $parserCacheFactory, RevisionLookup $revisionLookup, RevisionRenderer $revisionRenderer, StatsFactory $statsFactory, ILBFactory $lbFactory, ChronologyProtector $chronologyProtector, LoggerSpi $loggerSpi, WikiPageFactory $wikiPageFactory, TitleFormatter $titleFormatter, TracerInterface $tracer) | |
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 61 of file ParserOutputAccess.php.
MediaWiki\Page\ParserOutputAccess::__construct | ( | ParserCacheFactory | $parserCacheFactory, |
RevisionLookup | $revisionLookup, | ||
RevisionRenderer | $revisionRenderer, | ||
StatsFactory | $statsFactory, | ||
ILBFactory | $lbFactory, | ||
ChronologyProtector | $chronologyProtector, | ||
LoggerSpi | $loggerSpi, | ||
WikiPageFactory | $wikiPageFactory, | ||
TitleFormatter | $titleFormatter, | ||
TracerInterface | $tracer ) |
Definition at line 148 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 223 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 313 of file ParserOutputAccess.php.
|
protected |
PageRecord | $page | |
ParserOptions | $parserOptions | |
RevisionRecord | $revision | |
int | $options |
Definition at line 555 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 113 of file ParserOutputAccess.php.
const MediaWiki\Page\ParserOutputAccess::PARSOID_PCACHE_NAME = 'parsoid-' . ParserCacheFactory::DEFAULT_NAME |
Definition at line 64 of file ParserOutputAccess.php.
const MediaWiki\Page\ParserOutputAccess::PARSOID_RCACHE_NAME = 'parsoid-' . ParserCacheFactory::DEFAULT_RCACHE_NAME |
Definition at line 67 of file ParserOutputAccess.php.