MediaWiki REL1_37
|
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. | |
getParserOutput (PageRecord $page, ParserOptions $parserOptions, ?RevisionRecord $revision=null, int $options=0) | |
Returns the rendered output for the given page. | |
Private Member Functions | |
checkPreconditions (PageRecord $page, ?RevisionRecord $revision=null, int $options=0) | |
newPoolWorkArticleView (PageRecord $page, ParserOptions $parserOptions, RevisionRecord $revision, int $options) | |
shouldUseCache (PageRecord $page, ParserOptions $parserOptions, ?RevisionRecord $rev) | |
Use a cache? | |
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.
MediaWiki\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 128 of file ParserOutputAccess.php.
References MediaWiki\Page\ParserOutputAccess\$lbFactory, MediaWiki\Page\ParserOutputAccess\$loggerSpi, MediaWiki\Page\ParserOutputAccess\$primaryCache, MediaWiki\Page\ParserOutputAccess\$revisionLookup, MediaWiki\Page\ParserOutputAccess\$revisionRenderer, MediaWiki\Page\ParserOutputAccess\$secondaryCache, MediaWiki\Page\ParserOutputAccess\$statsDataFactory, MediaWiki\Page\ParserOutputAccess\$titleFormatter, and MediaWiki\Page\ParserOutputAccess\$wikiPageFactory.
|
private |
PageRecord | $page | |
RevisionRecord | null | $revision | |
int | $options |
Definition at line 325 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 201 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 245 of file ParserOutputAccess.php.
|
private |
PageRecord | $page | |
ParserOptions | $parserOptions | |
RevisionRecord | $revision | |
int | $options |
Definition at line 370 of file ParserOutputAccess.php.
References CACHE_NONE.
|
private |
Use a cache?
PageRecord | $page | |
ParserOptions | $parserOptions | ParserOptions to check |
RevisionRecord | null | $rev |
Definition at line 159 of file ParserOutputAccess.php.
References MediaWiki\Revision\RevisionRecord\audienceCan(), CACHE_NONE, MediaWiki\Page\PageIdentity\exists(), MediaWiki\Revision\RevisionRecord\getId(), and MediaWiki\Page\PageRecord\getLatest().
|
private |
Definition at line 106 of file ParserOutputAccess.php.
Referenced by MediaWiki\Page\ParserOutputAccess\__construct().
|
private |
Definition at line 109 of file ParserOutputAccess.php.
Referenced by MediaWiki\Page\ParserOutputAccess\__construct().
|
private |
Definition at line 89 of file ParserOutputAccess.php.
Referenced by MediaWiki\Page\ParserOutputAccess\__construct().
|
private |
Definition at line 97 of file ParserOutputAccess.php.
Referenced by MediaWiki\Page\ParserOutputAccess\__construct().
|
private |
Definition at line 100 of file ParserOutputAccess.php.
Referenced by MediaWiki\Page\ParserOutputAccess\__construct().
|
private |
Definition at line 94 of file ParserOutputAccess.php.
Referenced by MediaWiki\Page\ParserOutputAccess\__construct().
|
private |
Definition at line 103 of file ParserOutputAccess.php.
Referenced by MediaWiki\Page\ParserOutputAccess\__construct().
|
private |
Definition at line 115 of file ParserOutputAccess.php.
Referenced by MediaWiki\Page\ParserOutputAccess\__construct().
|
private |
Definition at line 112 of file ParserOutputAccess.php.
Referenced by MediaWiki\Page\ParserOutputAccess\__construct().