|
MediaWiki master
|
Service for getting rendered output of a given page. More...
Inherits LoggerAwareInterface.

Public Member Functions | |
| __construct (ParserCacheFactory $parserCacheFactory, RevisionLookup $revisionLookup, RevisionRenderer $revisionRenderer, StatsFactory $statsFactory, ChronologyProtector $chronologyProtector, WikiPageFactory $wikiPageFactory, TitleFormatter $titleFormatter, TracerInterface $tracer, PoolCounterFactory $poolCounterFactory) | |
| clearLocalCache () | |
| Clear the local cache. | |
| getCachedParserOutput (PageRecord $page, ParserOptions $parserOptions, ?RevisionRecord $revision=null, $options=[]) | |
| Get the rendered output for the given page if it is present in the cache. | |
| getParserOutput (PageRecord $page, ParserOptions $parserOptions, ?RevisionRecord $revision=null, $options=[]) | |
| Returns the rendered output for the given page. | |
| postprocess (ParserOutput $output, ParserOptions $parserOptions) | |
| Postprocess the given ParserOutput. | |
| setLogger (LoggerInterface $logger) | |
Public Attributes | |
| const | OPT_FOR_ARTICLE_VIEW = 16 |
| Apply page view semantics. | |
| const | OPT_POOL_COUNTER = 'poolcounter-type' |
| const | OPT_POOL_COUNTER_FALLBACK = 'poolcounter-fallback' |
| Whether to fall back to using stale content when failing to get a poolcounter lock. | |
| const | PARSOID_PCACHE_NAME = 'parsoid-' . ParserCacheFactory::DEFAULT_NAME |
| const | PARSOID_RCACHE_NAME = 'parsoid-' . ParserCacheFactory::DEFAULT_RCACHE_NAME |
| const | POOL_COUNTER_ARTICLE_VIEW = 'ArticleView' |
| const | POOL_COUNTER_REST_API = 'HtmlRestApi' |
| const | POSTPROC_CACHE_PREFIX = 'postproc-' |
Protected Member Functions | |
| newPoolWork (PageRecord $page, ParserOptions $parserOptions, RevisionRecord $revision, array $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 45 of file ParserOutputAccess.php.
| MediaWiki\Page\ParserOutputAccess::__construct | ( | ParserCacheFactory | $parserCacheFactory, |
| RevisionLookup | $revisionLookup, | ||
| RevisionRenderer | $revisionRenderer, | ||
| StatsFactory | $statsFactory, | ||
| ChronologyProtector | $chronologyProtector, | ||
| WikiPageFactory | $wikiPageFactory, | ||
| TitleFormatter | $titleFormatter, | ||
| TracerInterface | $tracer, | ||
| PoolCounterFactory | $poolCounterFactory ) |
Definition at line 172 of file ParserOutputAccess.php.
| MediaWiki\Page\ParserOutputAccess::clearLocalCache | ( | ) |
| MediaWiki\Page\ParserOutputAccess::getCachedParserOutput | ( | PageRecord | $page, |
| ParserOptions | $parserOptions, | ||
| ?RevisionRecord | $revision = null, | ||
| $options = [] ) |
Get the rendered output for the given page if it is present in the cache.
| PageRecord | $page | |
| ParserOptions | $parserOptions | |
| RevisionRecord | null | $revision | |
| int | array | $options | Bitfield or associative array using the OPT_XXX constants. Passing an int is deprecated and will trigger deprecation warnings in the future. |
Definition at line 301 of file ParserOutputAccess.php.
| MediaWiki\Page\ParserOutputAccess::getParserOutput | ( | PageRecord | $page, |
| ParserOptions | $parserOptions, | ||
| ?RevisionRecord | $revision = null, | ||
| $options = [] ) |
Returns the rendered output for the given page.
Caching and concurrency control is applied.
| PageRecord | $page | |
| ParserOptions | $parserOptions | |
| RevisionRecord | null | $revision | |
| int | array | $options | Bitfield or associative array using the OPT_XXX constants. Passing an int is deprecated and will trigger deprecation warnings in the future. |
Definition at line 436 of file ParserOutputAccess.php.
|
protected |
Definition at line 670 of file ParserOutputAccess.php.
| MediaWiki\Page\ParserOutputAccess::postprocess | ( | ParserOutput | $output, |
| ParserOptions | $parserOptions ) |
Postprocess the given ParserOutput.
Definition at line 827 of file ParserOutputAccess.php.
References MediaWiki\Parser\ParserOptions\getOption().
| MediaWiki\Page\ParserOutputAccess::setLogger | ( | LoggerInterface | $logger | ) |
Definition at line 197 of file ParserOutputAccess.php.
| const MediaWiki\Page\ParserOutputAccess::OPT_FOR_ARTICLE_VIEW = 16 |
Apply page view semantics.
This relaxes some guarantees, specifically:
Definition at line 102 of file ParserOutputAccess.php.
| const MediaWiki\Page\ParserOutputAccess::OPT_POOL_COUNTER = 'poolcounter-type' |
Definition at line 124 of file ParserOutputAccess.php.
| const MediaWiki\Page\ParserOutputAccess::OPT_POOL_COUNTER_FALLBACK = 'poolcounter-fallback' |
Whether to fall back to using stale content when failing to get a poolcounter lock.
Definition at line 119 of file ParserOutputAccess.php.
| const MediaWiki\Page\ParserOutputAccess::PARSOID_PCACHE_NAME = 'parsoid-' . ParserCacheFactory::DEFAULT_NAME |
Definition at line 48 of file ParserOutputAccess.php.
| const MediaWiki\Page\ParserOutputAccess::PARSOID_RCACHE_NAME = 'parsoid-' . ParserCacheFactory::DEFAULT_RCACHE_NAME |
Definition at line 51 of file ParserOutputAccess.php.
| const MediaWiki\Page\ParserOutputAccess::POOL_COUNTER_ARTICLE_VIEW = 'ArticleView' |
Definition at line 129 of file ParserOutputAccess.php.
| const MediaWiki\Page\ParserOutputAccess::POOL_COUNTER_REST_API = 'HtmlRestApi' |
Definition at line 134 of file ParserOutputAccess.php.
| const MediaWiki\Page\ParserOutputAccess::POSTPROC_CACHE_PREFIX = 'postproc-' |
Definition at line 54 of file ParserOutputAccess.php.