MediaWiki  master
PoolWorkArticleView Class Reference
Inheritance diagram for PoolWorkArticleView:
Collaboration diagram for PoolWorkArticleView:

Public Member Functions

 __construct (WikiPage $page, ParserOptions $parserOptions, $revid, $useParserCache, $revision=null, $audience=RevisionRecord::FOR_PUBLIC)
 
 doWork ()
 
 error ( $status)
 
 fallback ( $fast)
 
 getCachedWork ()
 
 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...
 

Private Attributes

int $audience
 
string $cacheKey
 
Status bool $error = false
 
bool $isDirty = false
 
bool $isFast = false
 
WikiPage $page
 
ParserCache $parserCache
 
ParserOptions $parserOptions
 
ParserOutput bool $parserOutput = false
 
RevisionRenderer $renderer = null
 
int $revid
 
RevisionRecord null $revision = null
 
RevisionStore $revisionStore = null
 

Additional Inherited Members

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

Detailed Description

Definition at line 28 of file PoolWorkArticleView.php.

Constructor & Destructor Documentation

◆ __construct()

PoolWorkArticleView::__construct ( WikiPage  $page,
ParserOptions  $parserOptions,
  $revid,
  $useParserCache,
  $revision = null,
  $audience = RevisionRecord::FOR_PUBLIC 
)
Parameters
WikiPage$page
ParserOptions$parserOptionsParserOptions to use for the parse
int$revidID of the revision being parsed.
bool$useParserCacheWhether to use the parser cache. operation.
RevisionRecord | Content | string | null$revisionRevision to render, or null to load it; may also be given as a wikitext string, or a Content object, for BC.
int$audienceOne of the RevisionRecord audience constants

Definition at line 78 of file PoolWorkArticleView.php.

References $audience, $content, $page, $parserOptions, $revid, $revision, Revision\RevisionRecord\getId(), WikiPage\getId(), ObjectCache\getLocalClusterInstance(), Revision\RevisionRecord\getPageId(), WikiPage\getRevisionRecord(), WikiPage\getTitle(), and ContentHandler\makeContent().

Member Function Documentation

◆ doWork()

PoolWorkArticleView::doWork ( )

◆ error()

PoolWorkArticleView::error (   $status)
Parameters
Status$status
Returns
bool

Reimplemented from PoolCounterWork.

Definition at line 313 of file PoolWorkArticleView.php.

◆ fallback()

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

Reimplemented from PoolCounterWork.

Definition at line 269 of file PoolWorkArticleView.php.

References wfDebugLog().

◆ getCachedWork()

PoolWorkArticleView::getCachedWork ( )
Returns
bool

Reimplemented from PoolCounterWork.

Definition at line 253 of file PoolWorkArticleView.php.

References wfDebug().

◆ getError()

PoolWorkArticleView::getError ( )

Get a Status object in case of error or false otherwise.

Returns
Status|bool

Definition at line 169 of file PoolWorkArticleView.php.

References $error.

◆ getIsDirty()

PoolWorkArticleView::getIsDirty ( )

Get whether the ParserOutput is a dirty one (i.e.

expired)

Returns
bool

Definition at line 151 of file PoolWorkArticleView.php.

References $isDirty.

◆ getIsFastStale()

PoolWorkArticleView::getIsFastStale ( )

Get whether the ParserOutput was retrieved in fast stale mode.

Returns
bool

Definition at line 160 of file PoolWorkArticleView.php.

References $isFast.

◆ getParserOutput()

PoolWorkArticleView::getParserOutput ( )

Get the ParserOutput from this object, or false in case of failure.

Returns
ParserOutput|bool

Definition at line 142 of file PoolWorkArticleView.php.

References $parserOutput.

Member Data Documentation

◆ $audience

int PoolWorkArticleView::$audience
private

Definition at line 48 of file PoolWorkArticleView.php.

Referenced by __construct(), and doWork().

◆ $cacheKey

string PoolWorkArticleView::$cacheKey
private

Definition at line 33 of file PoolWorkArticleView.php.

◆ $error

Status bool PoolWorkArticleView::$error = false
private

Definition at line 66 of file PoolWorkArticleView.php.

Referenced by getError().

◆ $isDirty

bool PoolWorkArticleView::$isDirty = false
private

Definition at line 60 of file PoolWorkArticleView.php.

Referenced by getIsDirty().

◆ $isFast

bool PoolWorkArticleView::$isFast = false
private

Definition at line 63 of file PoolWorkArticleView.php.

Referenced by getIsFastStale().

◆ $page

WikiPage PoolWorkArticleView::$page
private

Definition at line 30 of file PoolWorkArticleView.php.

Referenced by __construct().

◆ $parserCache

ParserCache PoolWorkArticleView::$parserCache
private

Definition at line 39 of file PoolWorkArticleView.php.

◆ $parserOptions

ParserOptions PoolWorkArticleView::$parserOptions
private

Definition at line 42 of file PoolWorkArticleView.php.

Referenced by __construct().

◆ $parserOutput

ParserOutput bool PoolWorkArticleView::$parserOutput = false
private

Definition at line 57 of file PoolWorkArticleView.php.

Referenced by getParserOutput().

◆ $renderer

RevisionRenderer PoolWorkArticleView::$renderer = null
private

Definition at line 54 of file PoolWorkArticleView.php.

◆ $revid

int PoolWorkArticleView::$revid
private

Definition at line 36 of file PoolWorkArticleView.php.

Referenced by __construct().

◆ $revision

RevisionRecord null PoolWorkArticleView::$revision = null
private

Definition at line 45 of file PoolWorkArticleView.php.

Referenced by __construct(), and doWork().

◆ $revisionStore

RevisionStore PoolWorkArticleView::$revisionStore = null
private

Definition at line 51 of file PoolWorkArticleView.php.


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