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...
 

Private Attributes

ILBFactory $lbFactory
 
PageRecord $page
 
ParserCache $parserCache
 
WikiPageFactory $wikiPageFactory
 
string $workKey
 

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 62 of file PoolWorkArticleViewCurrent.php.

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

Member Function Documentation

◆ doWork()

PoolWorkArticleViewCurrent::doWork ( )
Returns
Status

Reimplemented from PoolWorkArticleView.

Definition at line 93 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 135 of file PoolWorkArticleViewCurrent.php.

References StatusValue\newGood().

◆ getCachedWork()

PoolWorkArticleViewCurrent::getCachedWork ( )
Returns
Status|false

Reimplemented from PoolCounterWork.

Definition at line 122 of file PoolWorkArticleViewCurrent.php.

References StatusValue\newGood().

Member Data Documentation

◆ $lbFactory

ILBFactory PoolWorkArticleViewCurrent::$lbFactory
private

Definition at line 45 of file PoolWorkArticleViewCurrent.php.

Referenced by __construct().

◆ $page

PageRecord PoolWorkArticleViewCurrent::$page
private

Definition at line 39 of file PoolWorkArticleViewCurrent.php.

Referenced by __construct().

◆ $parserCache

ParserCache PoolWorkArticleViewCurrent::$parserCache
private

Definition at line 42 of file PoolWorkArticleViewCurrent.php.

Referenced by __construct().

◆ $wikiPageFactory

WikiPageFactory PoolWorkArticleViewCurrent::$wikiPageFactory
private

Definition at line 48 of file PoolWorkArticleViewCurrent.php.

Referenced by __construct().

◆ $workKey

string PoolWorkArticleViewCurrent::$workKey
private

Definition at line 36 of file PoolWorkArticleViewCurrent.php.

Referenced by __construct().


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