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)
 
 fallback ( $fast)
 
 getCachedWork ()
 
- Public Member Functions inherited from PoolWorkArticleView
 __construct (string $workKey, RevisionRecord $revision, ParserOptions $parserOptions, RevisionRenderer $revisionRenderer, LoggerSpi $loggerSpi)
 
 doWork ()
 
 error ( $status)
 
 getError ()
 Get a Status object in case of error or false otherwise. More...
 
 getIsDirty ()
 Get whether the ParserOutput is a dirty one (i.e. More...
 
 getIsFastStale ()
 Get whether the ParserOutput was retrieved in fast stale mode. More...
 
 getParserOutput ()
 Get the ParserOutput from this object, or false in case of failure. More...
 
- 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...
 

Protected Member Functions

 afterWork (ParserOutput $output)
 
 saveInCache (ParserOutput $output, string $cacheTime)
 
- Protected Member Functions inherited from PoolWorkArticleView
 getLogger ( $name='PoolWorkArticleView')
 
- Protected Member Functions inherited from PoolCounterWork
 isFastStaleEnabled ()
 Should fast stale mode be used? More...
 

Private Attributes

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

Additional Inherited Members

- Protected Attributes inherited from PoolWorkArticleView
Status bool $error = false
 
bool $isDirty = false
 
bool $isFast = false
 
ParserOptions $parserOptions
 
ParserOutput bool $parserOutput = false
 
RevisionRenderer $renderer = null
 
RevisionRecord null $revision = null
 
- 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 
)
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

Definition at line 61 of file PoolWorkArticleViewCurrent.php.

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

Member Function Documentation

◆ afterWork()

PoolWorkArticleViewCurrent::afterWork ( ParserOutput  $output)
protected
Parameters
ParserOutput$output

Reimplemented from PoolWorkArticleView.

Definition at line 105 of file PoolWorkArticleViewCurrent.php.

◆ fallback()

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

Reimplemented from PoolCounterWork.

Definition at line 130 of file PoolWorkArticleViewCurrent.php.

References PoolWorkArticleView\getLogger().

◆ getCachedWork()

PoolWorkArticleViewCurrent::getCachedWork ( )
Returns
bool

Reimplemented from PoolCounterWork.

Definition at line 113 of file PoolWorkArticleViewCurrent.php.

References PoolWorkArticleView\getLogger().

◆ saveInCache()

PoolWorkArticleViewCurrent::saveInCache ( ParserOutput  $output,
string  $cacheTime 
)
protected
Parameters
ParserOutput$output
string$cacheTime

Reimplemented from PoolWorkArticleView.

Definition at line 92 of file PoolWorkArticleViewCurrent.php.

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: