MediaWiki REL1_37
PoolWorkArticleViewOld Class Reference

PoolWorkArticleView for an old revision of a page, using a simple cache. More...

Inheritance diagram for PoolWorkArticleViewOld:
Collaboration diagram for PoolWorkArticleViewOld:

Public Member Functions

 __construct (string $workKey, RevisionOutputCache $cache, RevisionRecord $revision, ParserOptions $parserOptions, RevisionRenderer $revisionRenderer, LoggerSpi $loggerSpi)
 
 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.
 
 getIsDirty ()
 Get whether the ParserOutput is a dirty one (i.e.
 
 getIsFastStale ()
 Get whether the ParserOutput was retrieved in fast stale mode.
 
 getParserOutput ()
 Get the ParserOutput from this object, or false in case of failure.
 
- 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.
 
 logError ( $status)
 Log an error.
 

Protected Member Functions

 saveInCache (ParserOutput $output, string $cacheTime)
 
- Protected Member Functions inherited from PoolWorkArticleView
 afterWork (ParserOutput $output)
 Subclasses may implement this to perform some action after the work of rendering is done.
 
 getLogger ( $name='PoolWorkArticleView')
 
- Protected Member Functions inherited from PoolCounterWork
 isFastStaleEnabled ()
 Should fast stale mode be used?
 

Private Attributes

RevisionOutputCache $cache
 

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 an old revision of a page, using a simple cache.

Access: internal

Definition at line 30 of file PoolWorkArticleViewOld.php.

Constructor & Destructor Documentation

◆ __construct()

PoolWorkArticleViewOld::__construct ( string  $workKey,
RevisionOutputCache  $cache,
RevisionRecord  $revision,
ParserOptions  $parserOptions,
RevisionRenderer  $revisionRenderer,
LoggerSpi  $loggerSpi 
)
Parameters
string$workKeyPoolCounter key.
RevisionOutputCache$cacheThe cache to store ParserOutput in.
RevisionRecord$revisionRevision to render
ParserOptions$parserOptionsParserOptions to use for the parse
RevisionRenderer$revisionRenderer
LoggerSpi$loggerSpi

Definition at line 43 of file PoolWorkArticleViewOld.php.

References $cache.

Member Function Documentation

◆ getCachedWork()

PoolWorkArticleViewOld::getCachedWork ( )
Returns
bool

Reimplemented from PoolCounterWork.

Definition at line 69 of file PoolWorkArticleViewOld.php.

◆ saveInCache()

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

Reimplemented from PoolWorkArticleView.

Definition at line 62 of file PoolWorkArticleViewOld.php.

Member Data Documentation

◆ $cache

RevisionOutputCache PoolWorkArticleViewOld::$cache
private

Definition at line 33 of file PoolWorkArticleViewOld.php.


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