MediaWiki REL1_40
MediaWiki\Deferred\LinksUpdate\LinksDeletionUpdate Class Reference

Update object handling the cleanup of links tables after a page was deleted. More...

Inherits MediaWiki\Deferred\LinksUpdate\LinksUpdate, and EnqueueableDataUpdate.

Collaboration diagram for MediaWiki\Deferred\LinksUpdate\LinksDeletionUpdate:

Public Member Functions

 __construct (WikiPage $page, $pageId=null, $timestamp=null)
 
 getAsJobSpecification ()
 
- Public Member Functions inherited from MediaWiki\Deferred\LinksUpdate\LinksUpdate
 __construct (PageIdentity $page, ParserOutput $parserOutput, $recursive=true)
 
 doUpdate ()
 Update link tables with outgoing links from an updated article.
 
 getAddedExternalLinks ()
 Fetch external links added by this LinksUpdate.
 
 getAddedLinks ()
 Fetch page links added by this LinksUpdate.
 
 getAddedProperties ()
 Fetch page properties added by this LinksUpdate.
 
 getImages ()
 Return the list of images used as generated by the parser.
 
 getPageId ()
 Get the page_id of the page being updated.
 
 getPageReferenceArray ( $tableName, $setType)
 Same as getPageReferenceIterator() but converted to an array for convenience (at the expense of additional time and memory usage)
 
 getPageReferenceIterator ( $tableName, $setType)
 Get an iterator over PageReferenceValue objects corresponding to a given set type in a given table.
 
 getParserOutput ()
 Returns parser output.
 
 getRemovedExternalLinks ()
 Fetch external links removed by this LinksUpdate.
 
 getRemovedLinks ()
 Fetch page links removed by this LinksUpdate.
 
 getRemovedProperties ()
 Fetch page properties removed by this LinksUpdate.
 
 getRevisionRecord ()
 
 getTitle ()
 Return the title object of the page being updated.
 
 getTriggeringUser ()
 Get the user who triggered this LinksUpdate.
 
 isRecursive ()
 Whether or not this LinksUpdate will also update pages which transclude the current page or otherwise depend on it.
 
 setMoveDetails (PageReference $oldPage)
 Notify LinksUpdate that a move has just been completed and set the original title.
 
 setRevisionRecord (RevisionRecord $revisionRecord)
 Set the RevisionRecord corresponding to this LinksUpdate.
 
 setStrictTestMode ( $mode=true)
 Omit conflict resolution options from the insert query so that testing can confirm that the incremental update logic was correct.
 
 setTransactionTicket ( $ticket)
 
 setTriggeringUser (UserIdentity $user)
 Set the user who triggered this LinksUpdate.
 
- Public Member Functions inherited from DataUpdate
 __construct ()
 
 getCauseAction ()
 
 getCauseAgent ()
 
 setCause ( $action, $user)
 

Protected Member Functions

 doIncrementalUpdate ()
 
- Protected Member Functions inherited from MediaWiki\Deferred\LinksUpdate\LinksUpdate
 getDB ()
 
 getExternalLinksTable ()
 
 getPageLinksTable ()
 
 getPagePropsTable ()
 
 queueRecursiveJobs ()
 Queue recursive jobs for this page.
 
 updateLinksTimestamp ()
 Update links table freshness.
 

Protected Attributes

WikiPage $page
 
string $timestamp
 
- Protected Attributes inherited from MediaWiki\Deferred\LinksUpdate\LinksUpdate
int $mId
 Page ID of the article linked from.
 
ParserOutput $mParserOutput
 
bool $mRecursive
 Whether to queue jobs for recursive updates.
 
Title $mTitle
 Title object of the article linked from.
 
- Protected Attributes inherited from DataUpdate
string $causeAction = 'unknown'
 Short update cause action description.
 
string $causeAgent = 'unknown'
 Short update cause user description.
 
mixed $ticket
 Result from LBFactory::getEmptyTransactionTicket()
 

Additional Inherited Members

- Static Public Member Functions inherited from MediaWiki\Deferred\LinksUpdate\LinksUpdate
static acquirePageLock (IDatabase $dbw, $pageId, $why='atomicity')
 Acquire a session-level lock for performing link table updates for a page on a DB.
 
static queueRecursiveJobsForTable (PageIdentity $page, $table, $action='LinksUpdate', $userName='unknown', ?BacklinkCache $backlinkCache=null)
 Queue a RefreshLinks job for any table.
 

Detailed Description

Update object handling the cleanup of links tables after a page was deleted.

Definition at line 39 of file LinksDeletionUpdate.php.

Constructor & Destructor Documentation

◆ __construct()

MediaWiki\Deferred\LinksUpdate\LinksDeletionUpdate::__construct ( WikiPage $page,
$pageId = null,
$timestamp = null )
Parameters
WikiPage$pagePage we are updating
int | null$pageIdID of the page we are updating [optional]
string | null$timestampTS_MW timestamp of deletion
Exceptions
MWException

Definition at line 51 of file LinksDeletionUpdate.php.

References MediaWiki\Deferred\LinksUpdate\LinksDeletionUpdate\$page, MediaWiki\Deferred\LinksUpdate\LinksDeletionUpdate\$timestamp, WikiPage\exists(), WikiPage\getId(), WikiPage\getTitle(), and wfTimestampNow().

Member Function Documentation

◆ doIncrementalUpdate()

◆ getAsJobSpecification()

MediaWiki\Deferred\LinksUpdate\LinksDeletionUpdate::getAsJobSpecification ( )
Returns
array (domain => DB domain ID, job => IJobSpecification)

Implements EnqueueableDataUpdate.

Definition at line 120 of file LinksDeletionUpdate.php.

References MediaWiki\Deferred\LinksUpdate\LinksUpdate\getDB().

Member Data Documentation

◆ $page

WikiPage MediaWiki\Deferred\LinksUpdate\LinksDeletionUpdate::$page
protected

◆ $timestamp

string MediaWiki\Deferred\LinksUpdate\LinksDeletionUpdate::$timestamp
protected

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