MediaWiki REL1_37
|
PoolCounter protected work wrapping RenderedRevision->getRevisionParserOutput. More...
Public Member Functions | |
__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. | |
getCachedWork () | |
Retrieve the work from cache. | |
logError ( $status) | |
Log an error. | |
Protected Member Functions | |
afterWork (ParserOutput $output) | |
Subclasses may implement this to perform some action after the work of rendering is done. | |
getLogger ( $name='PoolWorkArticleView') | |
saveInCache (ParserOutput $output, string $cacheTime) | |
Place the output in the cache from which getCachedWork() will retrieve it. | |
Protected Member Functions inherited from PoolCounterWork | |
isFastStaleEnabled () | |
Should fast stale mode be used? | |
Protected Attributes | |
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' |
Private Attributes | |
LoggerSpi | $loggerSpi |
PoolCounter protected work wrapping RenderedRevision->getRevisionParserOutput.
Caching behavior may be defined by subclasses.
Definition at line 34 of file PoolWorkArticleView.php.
PoolWorkArticleView::__construct | ( | string | $workKey, |
RevisionRecord | $revision, | ||
ParserOptions | $parserOptions, | ||
RevisionRenderer | $revisionRenderer, | ||
LoggerSpi | $loggerSpi | ||
) |
string | $workKey | |
RevisionRecord | $revision | Revision to render |
ParserOptions | $parserOptions | ParserOptions to use for the parse |
RevisionRenderer | $revisionRenderer | |
LoggerSpi | $loggerSpi |
Definition at line 67 of file PoolWorkArticleView.php.
|
protected |
Subclasses may implement this to perform some action after the work of rendering is done.
Will be called after saveInCache().
ParserOutput | $output |
Reimplemented in PoolWorkArticleViewCurrent.
Definition at line 178 of file PoolWorkArticleView.php.
Referenced by doWork().
PoolWorkArticleView::doWork | ( | ) |
Reimplemented from PoolCounterWork.
Definition at line 120 of file PoolWorkArticleView.php.
References afterWork(), getLogger(), saveInCache(), and wfTimestampNow().
PoolWorkArticleView::error | ( | $status | ) |
Status | $status |
Reimplemented from PoolCounterWork.
Definition at line 186 of file PoolWorkArticleView.php.
References error().
Referenced by error().
PoolWorkArticleView::getError | ( | ) |
Get a Status object in case of error or false otherwise.
Definition at line 113 of file PoolWorkArticleView.php.
PoolWorkArticleView::getIsDirty | ( | ) |
Get whether the ParserOutput is a dirty one (i.e.
expired)
Definition at line 95 of file PoolWorkArticleView.php.
PoolWorkArticleView::getIsFastStale | ( | ) |
Get whether the ParserOutput was retrieved in fast stale mode.
Definition at line 104 of file PoolWorkArticleView.php.
|
protected |
string | $name |
Definition at line 196 of file PoolWorkArticleView.php.
References getLogger().
Referenced by doWork(), PoolWorkArticleViewCurrent\fallback(), PoolWorkArticleViewCurrent\getCachedWork(), and getLogger().
PoolWorkArticleView::getParserOutput | ( | ) |
Get the ParserOutput from this object, or false in case of failure.
Definition at line 86 of file PoolWorkArticleView.php.
|
protected |
Place the output in the cache from which getCachedWork() will retrieve it.
Will be called before saveInCache().
ParserOutput | $output | |
string | $cacheTime |
Reimplemented in PoolWorkArticleViewCurrent, and PoolWorkArticleViewOld.
Definition at line 168 of file PoolWorkArticleView.php.
Referenced by doWork().
|
protected |
Definition at line 55 of file PoolWorkArticleView.php.
|
protected |
Definition at line 49 of file PoolWorkArticleView.php.
|
protected |
Definition at line 52 of file PoolWorkArticleView.php.
|
private |
Definition at line 58 of file PoolWorkArticleView.php.
|
protected |
Definition at line 37 of file PoolWorkArticleView.php.
|
protected |
Definition at line 46 of file PoolWorkArticleView.php.
|
protected |
Definition at line 43 of file PoolWorkArticleView.php.
|
protected |
Definition at line 40 of file PoolWorkArticleView.php.