MediaWiki  master
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. More...
 
 fallback ( $fast)
 A work not so good (eg. More...
 
 getCachedWork ()
 Retrieve the work from cache. More...
 
 logError ( $status)
 Log an error. More...
 

Protected Attributes

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

Private Attributes

RevisionRenderer $renderer
 

Additional Inherited Members

- Protected Member Functions inherited from PoolCounterWork
 isFastStaleEnabled ()
 Should fast stale mode be used? More...
 

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.

References $loggerSpi, $parserOptions, and $revision.

Member Function Documentation

◆ doWork()

PoolWorkArticleView::doWork ( )
Returns
Status

Reimplemented from PoolCounterWork.

Reimplemented in PoolWorkArticleViewOld, and PoolWorkArticleViewCurrent.

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.

References StatusValue\newFatal().

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

Member Data Documentation

◆ $loggerSpi

LoggerSpi PoolWorkArticleView::$loggerSpi
protected

◆ $parserOptions

ParserOptions PoolWorkArticleView::$parserOptions
protected

◆ $renderer

RevisionRenderer PoolWorkArticleView::$renderer
private

Definition at line 42 of file PoolWorkArticleView.php.

◆ $revision

RevisionRecord PoolWorkArticleView::$revision
protected

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