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

Public Member Functions

 __construct (WikiPage $page, ParserOptions $parserOptions, $revid, $useParserCache, $content=null)
 
 doWork ()
 
 error ( $status)
 
 fallback ()
 
 getCachedWork ()
 
 getError ()
 Get a Status object in case of error or false otherwise.
 
 getIsDirty ()
 Get whether the ParserOutput is a dirty one (i.e.
 
 getParserOutput ()
 Get the ParserOutput from this object, or false in case of failure.
 
- Public Member Functions inherited from PoolCounterWork
 __construct ( $type, $key)
 
 execute ( $skipcache=false)
 Get the result of the work (whatever it is), or the result of the error() function.
 
 logError ( $status)
 Log an error.
 

Private Attributes

string $cacheKey
 
Content null $content = null
 
Status bool $error = false
 
bool $isDirty = false
 
WikiPage $page
 
ParserOptions $parserOptions
 
ParserOutput bool $parserOutput = false
 
int $revid
 

Additional Inherited Members

- Protected Attributes inherited from PoolCounterWork
bool $cacheable = false
 
string $type = 'generic'
 

Detailed Description

Definition at line 21 of file PoolWorkArticleView.php.

Constructor & Destructor Documentation

◆ __construct()

PoolWorkArticleView::__construct ( WikiPage  $page,
ParserOptions  $parserOptions,
  $revid,
  $useParserCache,
  $content = null 
)
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.
Content | string$contentContent to parse or null to load it; may also be given as a wikitext string, for BC.

Definition at line 55 of file PoolWorkArticleView.php.

References $content, $page, $parserOptions, $revid, content, WikiPage\getRevision(), WikiPage\getTitle(), ContentHandler\makeContent(), page, ParserCache\singleton(), and wfMemcKey().

Member Function Documentation

◆ doWork()

PoolWorkArticleView::doWork ( )

◆ error()

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

Reimplemented from PoolCounterWork.

Definition at line 210 of file PoolWorkArticleView.php.

References $status, and error().

Referenced by error().

◆ fallback()

PoolWorkArticleView::fallback ( )
Returns
bool

Reimplemented from PoolCounterWork.

Definition at line 191 of file PoolWorkArticleView.php.

References page, ParserCache\singleton(), wfDebug(), and wfDebugLog().

◆ getCachedWork()

PoolWorkArticleView::getCachedWork ( )
Returns
bool

Reimplemented from PoolCounterWork.

Definition at line 176 of file PoolWorkArticleView.php.

References page, ParserCache\singleton(), and wfDebug().

◆ getError()

PoolWorkArticleView::getError ( )

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

Returns
Status|bool

Definition at line 97 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 88 of file PoolWorkArticleView.php.

References $isDirty.

◆ getParserOutput()

PoolWorkArticleView::getParserOutput ( )

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

Returns
ParserOutput

Definition at line 79 of file PoolWorkArticleView.php.

References $parserOutput.

Member Data Documentation

◆ $cacheKey

string PoolWorkArticleView::$cacheKey
private

Definition at line 26 of file PoolWorkArticleView.php.

◆ $content

Content null PoolWorkArticleView::$content = null
private

Definition at line 35 of file PoolWorkArticleView.php.

Referenced by __construct(), and doWork().

◆ $error

Status bool PoolWorkArticleView::$error = false
private

Definition at line 44 of file PoolWorkArticleView.php.

Referenced by getError().

◆ $isDirty

bool PoolWorkArticleView::$isDirty = false
private

Definition at line 41 of file PoolWorkArticleView.php.

Referenced by getIsDirty().

◆ $page

WikiPage PoolWorkArticleView::$page
private

Definition at line 23 of file PoolWorkArticleView.php.

Referenced by __construct().

◆ $parserOptions

ParserOptions PoolWorkArticleView::$parserOptions
private

Definition at line 32 of file PoolWorkArticleView.php.

Referenced by __construct().

◆ $parserOutput

ParserOutput bool PoolWorkArticleView::$parserOutput = false
private

Definition at line 38 of file PoolWorkArticleView.php.

Referenced by getParserOutput().

◆ $revid

int PoolWorkArticleView::$revid
private

Definition at line 29 of file PoolWorkArticleView.php.

Referenced by __construct().


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