MediaWiki  master
PoolWorkArticleViewCurrent Class Reference

PoolWorkArticleView for the current revision of a page, using ParserCache. More...

Inheritance diagram for PoolWorkArticleViewCurrent:
Collaboration diagram for PoolWorkArticleViewCurrent:

Public Member Functions

 __construct (string $workKey, PageRecord $page, RevisionRecord $revision, ParserOptions $parserOptions, RevisionRenderer $revisionRenderer, ParserCache $parserCache, ILBFactory $lbFactory, LoggerSpi $loggerSpi, WikiPageFactory $wikiPageFactory, bool $cacheable=true)
 
 doWork ()
 
 fallback ( $fast)
 
 getCachedWork ()
 
- Public Member Functions inherited from PoolWorkArticleView
 __construct (string $workKey, RevisionRecord $revision, ParserOptions $parserOptions, RevisionRenderer $revisionRenderer, LoggerSpi $loggerSpi)
 
 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...
 
 logError ( $status)
 Log an error. More...
 

Additional Inherited Members

- Protected Member Functions inherited from PoolCounterWork
 isFastStaleEnabled ()
 Should fast stale mode be used? More...
 
- Protected Attributes inherited from PoolWorkArticleView
LoggerSpi $loggerSpi
 
ParserOptions $parserOptions
 
RevisionRecord $revision
 
- Protected Attributes inherited from PoolCounterWork
bool $cacheable = false
 
string $type = 'generic'
 

Detailed Description

PoolWorkArticleView for the current revision of a page, using ParserCache.

Access: internal

Definition at line 33 of file PoolWorkArticleViewCurrent.php.

Constructor & Destructor Documentation

◆ __construct()

PoolWorkArticleViewCurrent::__construct ( string  $workKey,
PageRecord  $page,
RevisionRecord  $revision,
ParserOptions  $parserOptions,
RevisionRenderer  $revisionRenderer,
ParserCache  $parserCache,
ILBFactory  $lbFactory,
LoggerSpi  $loggerSpi,
WikiPageFactory  $wikiPageFactory,
bool  $cacheable = true 
)
Parameters
string$workKey
PageRecord$page
RevisionRecord$revisionRevision to render
ParserOptions$parserOptionsParserOptions to use for the parse
RevisionRenderer$revisionRenderer
ParserCache$parserCache
ILBFactory$lbFactory
LoggerSpi$loggerSpi
WikiPageFactory$wikiPageFactory
bool$cacheableWhether it should store the result in cache or not

Definition at line 57 of file PoolWorkArticleViewCurrent.php.

References PoolCounterWork\$cacheable, PoolWorkArticleView\$loggerSpi, PoolWorkArticleView\$parserOptions, PoolWorkArticleView\$revision, MediaWiki\Page\ProperPageIdentity\getId(), and MediaWiki\Revision\RevisionRecord\getPageId().

Member Function Documentation

◆ doWork()

PoolWorkArticleViewCurrent::doWork ( )
Returns
Status

Reimplemented from PoolWorkArticleView.

Definition at line 88 of file PoolWorkArticleViewCurrent.php.

References PoolWorkArticleView\renderRevision(), and wfTimestampNow().

◆ fallback()

PoolWorkArticleViewCurrent::fallback (   $fast)
Parameters
bool$fastFast stale request
Returns
Status|false

Reimplemented from PoolCounterWork.

Definition at line 130 of file PoolWorkArticleViewCurrent.php.

References StatusValue\newGood().

◆ getCachedWork()

PoolWorkArticleViewCurrent::getCachedWork ( )
Returns
Status|false

Reimplemented from PoolCounterWork.

Definition at line 117 of file PoolWorkArticleViewCurrent.php.

References StatusValue\newGood().


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