MediaWiki REL1_39
PoolWorkArticleView Class Reference

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

Inheritance diagram for PoolWorkArticleView:
Collaboration diagram for PoolWorkArticleView:

Public Member Functions

 __construct (string $workKey, RevisionRecord $revision, ParserOptions $parserOptions, RevisionRenderer $revisionRenderer, LoggerSpi $loggerSpi)
 
 doWork ()
 
 error ( $status)
 
 renderRevision ()
 
- Public Member Functions inherited from 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 PoolCounterWork
bool $cacheable = false
 
string $type = 'generic'
 

Additional Inherited Members

- Protected Member Functions inherited from 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 33 of file PoolWorkArticleView.php.

Constructor & Destructor Documentation

◆ __construct()

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 54 of file PoolWorkArticleView.php.

Member Function Documentation

◆ doWork()

PoolWorkArticleView::doWork ( )
Returns
Status

Reimplemented from PoolCounterWork.

Reimplemented in PoolWorkArticleViewCurrent, and PoolWorkArticleViewOld.

Definition at line 71 of file PoolWorkArticleView.php.

References renderRevision().

◆ error()

PoolWorkArticleView::error ( $status)
Parameters
Status$status
Returns
Status

Reimplemented from PoolCounterWork.

Definition at line 112 of file PoolWorkArticleView.php.

◆ renderRevision()

PoolWorkArticleView::renderRevision ( )
Returns
Status with the value being a ParserOutput or null

Definition at line 78 of file PoolWorkArticleView.php.

Referenced by doWork(), PoolWorkArticleViewCurrent\doWork(), and PoolWorkArticleViewOld\doWork().

Member Data Documentation

◆ $loggerSpi

LoggerSpi PoolWorkArticleView::$loggerSpi
protected

Definition at line 45 of file PoolWorkArticleView.php.

◆ $parserOptions

ParserOptions PoolWorkArticleView::$parserOptions
protected

Definition at line 36 of file PoolWorkArticleView.php.

◆ $revision

RevisionRecord PoolWorkArticleView::$revision
protected

Definition at line 39 of file PoolWorkArticleView.php.


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