MediaWiki master
MediaWiki\PoolCounter\PoolWorkArticleView Class Reference

PoolCounter protected work wrapping RenderedRevision->getRevisionParserOutput. More...

Inherits MediaWiki\PoolCounter\PoolCounterWork.

Inherited by MediaWiki\PoolCounter\PoolWorkArticleViewCurrent, and MediaWiki\PoolCounter\PoolWorkArticleViewOld.

Collaboration diagram for MediaWiki\PoolCounter\PoolWorkArticleView:

Public Member Functions

 __construct (string $workKey, RevisionRecord $revision, ParserOptions $parserOptions, RevisionRenderer $revisionRenderer, LoggerSpi $loggerSpi)
 
 doWork ()
 
 error ( $status)
 
 renderRevision (?ParserOutput $previousOutput=null, bool $doSample=false, string $sourceLabel='')
 Render the given revision.
 
- Public Member Functions inherited from MediaWiki\PoolCounter\PoolCounterWork
 __construct (string $type, string $key, PoolCounter $poolCounter=null)
 
 execute ( $skipcache=false)
 Get the result of the work (whatever it is), or the result of the error() function.
 
 fallback ( $fast)
 A work not so good (eg.
 
 getCachedWork ()
 Retrieve the work from cache.
 
 logError ( $status)
 Log an error.
 

Protected Attributes

LoggerSpi $loggerSpi
 
ParserOptions $parserOptions
 
RevisionRecord $revision
 
- Protected Attributes inherited from MediaWiki\PoolCounter\PoolCounterWork
bool $cacheable = false
 
string $type = 'generic'
 

Additional Inherited Members

- Protected Member Functions inherited from MediaWiki\PoolCounter\PoolCounterWork
 isFastStaleEnabled ()
 Should fast stale mode be used?
 

Detailed Description

PoolCounter protected work wrapping RenderedRevision->getRevisionParserOutput.

Caching behavior may be defined by subclasses.

Note
No audience checks are applied.
Access: internal

Definition at line 40 of file PoolWorkArticleView.php.

Constructor & Destructor Documentation

◆ __construct()

MediaWiki\PoolCounter\PoolWorkArticleView::__construct ( string $workKey,
RevisionRecord $revision,
ParserOptions $parserOptions,
RevisionRenderer $revisionRenderer,
LoggerSpi $loggerSpi )
Parameters
string$workKey
RevisionRecord$revisionRevision to render
ParserOptions$parserOptionsParserOptions to use for the parse
RevisionRenderer$revisionRenderer
LoggerSpi$loggerSpi

Definition at line 57 of file PoolWorkArticleView.php.

References MediaWiki\PoolCounter\PoolWorkArticleView\$loggerSpi, MediaWiki\PoolCounter\PoolWorkArticleView\$parserOptions, and MediaWiki\PoolCounter\PoolWorkArticleView\$revision.

Member Function Documentation

◆ doWork()

MediaWiki\PoolCounter\PoolWorkArticleView::doWork ( )

◆ error()

MediaWiki\PoolCounter\PoolWorkArticleView::error ( $status)
Parameters
Status$status
Returns
Status

Reimplemented from MediaWiki\PoolCounter\PoolCounterWork.

Definition at line 132 of file PoolWorkArticleView.php.

◆ renderRevision()

MediaWiki\PoolCounter\PoolWorkArticleView::renderRevision ( ?ParserOutput $previousOutput = null,
bool $doSample = false,
string $sourceLabel = '' )

Render the given revision.

See also
ParserOutputAccess::renderRevision
Parameters
?ParserOutput$previousOutputpreviously-cached output for this page (used by Parsoid for selective updates)
bool$doSampleWhether to collect statistics on this render
string$sourceLabelthe source label to use on the statistics
Returns
Status with the value being a ParserOutput or null

Definition at line 89 of file PoolWorkArticleView.php.

References MediaWiki\MediaWikiServices\getInstance().

Referenced by MediaWiki\PoolCounter\PoolWorkArticleView\doWork(), MediaWiki\PoolCounter\PoolWorkArticleViewCurrent\doWork(), and MediaWiki\PoolCounter\PoolWorkArticleViewOld\doWork().

Member Data Documentation

◆ $loggerSpi

◆ $parserOptions

◆ $revision


The documentation for this class was generated from the following file: