MediaWiki REL1_32
LinksDeletionUpdate Class Reference

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

Inheritance diagram for LinksDeletionUpdate:
Collaboration diagram for LinksDeletionUpdate:

Public Member Functions

 __construct (WikiPage $page, $pageId=null, $timestamp=null)
 
 doUpdate ()
 Perform the actual work.
 
 getAsJobSpecification ()
 
- Public Member Functions inherited from DataUpdate
 __construct ()
 
 getCauseAction ()
 
 getCauseAgent ()
 
 setCause ( $action, $user)
 
 setTransactionTicket ( $ticket)
 

Protected Member Functions

 getDB ()
 

Protected Attributes

WikiPage $page
 
int $pageId
 
string $timestamp
 
- 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()
 

Private Member Functions

 batchDeleteByPK ( $table, array $conds, array $pk, $bSize)
 

Private Attributes

IDatabase $db
 

Additional Inherited Members

- Static Public Member Functions inherited from DataUpdate
static runUpdates (array $updates)
 Convenience method, calls doUpdate() on every DataUpdate in the array.
 

Detailed Description

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

Definition at line 29 of file LinksDeletionUpdate.php.

Constructor & Destructor Documentation

◆ __construct()

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 46 of file LinksDeletionUpdate.php.

References WikiPage\exists(), WikiPage\getId(), page, and wfTimestampNow().

Member Function Documentation

◆ batchDeleteByPK()

LinksDeletionUpdate::batchDeleteByPK (   $table,
array  $conds,
array  $pk,
  $bSize 
)
private

Definition at line 194 of file LinksDeletionUpdate.php.

References $res, $services, array(), as, getDB(), LIST_AND, and LIST_OR.

Referenced by doUpdate().

◆ doUpdate()

LinksDeletionUpdate::doUpdate ( )

Perform the actual work.

Implements DeferrableUpdate.

Definition at line 61 of file LinksDeletionUpdate.php.

References $services, $title, as, batchDeleteByPK(), getDB(), NS_CATEGORY, page, RC_LOG, and use.

◆ getAsJobSpecification()

LinksDeletionUpdate::getAsJobSpecification ( )
Returns
array (wiki => wiki ID, job => IJobSpecification)

Implements EnqueueableDataUpdate.

Definition at line 226 of file LinksDeletionUpdate.php.

References getDB(), WikiMap\getWikiIdFromDomain(), and page.

◆ getDB()

LinksDeletionUpdate::getDB ( )
protected

Definition at line 218 of file LinksDeletionUpdate.php.

References DB_MASTER, and wfGetDB().

Referenced by batchDeleteByPK(), doUpdate(), and getAsJobSpecification().

Member Data Documentation

◆ $db

IDatabase LinksDeletionUpdate::$db
private

Definition at line 38 of file LinksDeletionUpdate.php.

◆ $page

WikiPage LinksDeletionUpdate::$page
protected

Definition at line 31 of file LinksDeletionUpdate.php.

◆ $pageId

int LinksDeletionUpdate::$pageId
protected

Definition at line 33 of file LinksDeletionUpdate.php.

◆ $timestamp

string LinksDeletionUpdate::$timestamp
protected

Definition at line 35 of file LinksDeletionUpdate.php.


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