MediaWiki  master
LinksUpdate Class Reference

Class the manages updates of *_link tables as well as similar extension-managed tables. More...

Inheritance diagram for LinksUpdate:
Collaboration diagram for LinksUpdate:

Public Member Functions

 __construct (Title $title, ParserOutput $parserOutput, $recursive=true)
 
 doUpdate ()
 Update link tables with outgoing links from an updated article. More...
 
 getAddedExternalLinks ()
 Fetch external links added by this LinksUpdate. More...
 
 getAddedLinks ()
 Fetch page links added by this LinksUpdate. More...
 
 getAddedProperties ()
 Fetch page properties added by this LinksUpdate. More...
 
 getImages ()
 Return the list of images used as generated by the parser. More...
 
 getParserOutput ()
 Returns parser output. More...
 
 getPropertyInsertions ( $existing=[])
 Get an array of page property insertions. More...
 
 getRemovedExternalLinks ()
 Fetch external links removed by this LinksUpdate. More...
 
 getRemovedLinks ()
 Fetch page links removed by this LinksUpdate. More...
 
 getRemovedProperties ()
 Fetch page properties removed by this LinksUpdate. More...
 
 getRevision ()
 
 getTitle ()
 Return the title object of the page being updated. More...
 
 getTriggeringUser ()
 
 isRecursive ()
 Whether or not this LinksUpdate will also update pages which transclude the current page or otherwise depend on it. More...
 
 setRevision (Revision $revision)
 Set the revision corresponding to this LinksUpdate. More...
 
 setTriggeringUser (User $user)
 Set the User who triggered this LinksUpdate. More...
 
- Public Member Functions inherited from DataUpdate
 __construct ()
 
 getCauseAction ()
 
 getCauseAgent ()
 
 setCause ( $action, $user)
 
 setTransactionTicket ( $ticket)
 

Static Public Member Functions

static acquirePageLock (IDatabase $dbw, $pageId, $why='atomicity')
 Acquire a session-level lock for performing link table updates for a page on a DB. More...
 
static queueRecursiveJobsForTable (Title $title, $table, $action='unknown', $userName='unknown')
 Queue a RefreshLinks job for any table. More...
 
- Static Public Member Functions inherited from DataUpdate
static runUpdates (array $updates)
 Convenience method, calls doUpdate() on every DataUpdate in the array. More...
 

Public Attributes

array $mCategories
 Map of category names to sort keys. More...
 
array $mExternals
 URLs of external links, array key only. More...
 
int $mId
 Page ID of the article linked from. More...
 
array $mImages
 DB keys of the images used, in the array key only. More...
 
array $mInterlangs
 Map of language codes to titles. More...
 
array $mInterwikis
 2-D map of (prefix => DBK => 1) More...
 
int [][] $mLinks
 Map of title strings to IDs for the links in the document -var array<int,array<string,int>> More...
 
ParserOutput $mParserOutput
 
array $mProperties
 Map of arbitrary name to value. More...
 
bool $mRecursive
 Whether to queue jobs for recursive updates. More...
 
array $mTemplates
 Map of title strings to IDs for the template references, including broken ones. More...
 
Title $mTitle
 Title object of the article linked from. More...
 

Protected Member Functions

 doIncrementalUpdate ()
 
 getDB ()
 
 queueRecursiveJobs ()
 Queue recursive jobs for this page. More...
 

Private Member Functions

 getCategoryDeletions ( $existing)
 Given an array of existing categories, returns those categories which are not in $this and thus should be deleted. More...
 
 getCategoryInsertions ( $existing=[])
 Get an array of category insertions. More...
 
 getExistingCategories ()
 Get an array of existing categories, with the name in the key and sort key in the value. More...
 
 getExistingExternals ()
 Get an array of existing external links, URLs in the keys. More...
 
 getExistingImages ()
 Get an array of existing images, image names in the keys. More...
 
 getExistingInterlangs ()
 Get an array of existing interlanguage links, with the language code in the key and the title in the value. More...
 
 getExistingInterwikis ()
 Get an array of existing inline interwiki links, as a 2-D array. More...
 
 getExistingLinks ()
 Get an array of existing links, as a 2-D array. More...
 
 getExistingProperties ()
 Get an array of existing categories, with the name in the key and sort key in the value. More...
 
 getExistingTemplates ()
 Get an array of existing templates, as a 2-D array. More...
 
 getExternalDeletions ( $existing)
 Given an array of existing external links, returns those links which are not in $this and thus should be deleted. More...
 
 getExternalInsertions ( $existing=[])
 Get an array of externallinks insertions. More...
 
 getImageDeletions ( $existing)
 Given an array of existing images, returns those images which are not in $this and thus should be deleted. More...
 
 getImageInsertions ( $existing=[])
 Get an array of image insertions Skips the names specified in $existing. More...
 
 getInterlangDeletions ( $existing)
 Given an array of existing interlanguage links, returns those links which are not in $this and thus should be deleted. More...
 
 getInterlangInsertions ( $existing=[])
 Get an array of interlanguage link insertions. More...
 
 getInterwikiDeletions ( $existing)
 Given an array of existing interwiki links, returns those links which are not in $this and thus should be deleted. More...
 
 getInterwikiInsertions ( $existing=[])
 Get an array of interwiki insertions for passing to the DB Skips the titles specified by the 2-D array $existing. More...
 
 getLinkDeletions ( $existing)
 Given an array of existing links, returns those links which are not in $this and thus should be deleted. More...
 
 getLinkInsertions ( $existing=[])
 Get an array of pagelinks insertions for passing to the DB Skips the titles specified by the 2-D array $existing. More...
 
 getPagePropRowData ( $prop)
 Returns an associative array to be used for inserting a row into the page_props table. More...
 
 getPropertyDeletions ( $existing)
 Get array of properties which should be deleted. More...
 
 getPropertySortKeyValue ( $value)
 Determines the sort key for the given property value. More...
 
 getTemplateDeletions ( $existing)
 Given an array of existing templates, returns those templates which are not in $this and thus should be deleted. More...
 
 getTemplateInsertions ( $existing=[])
 Get an array of template insertions. More...
 
 incrTableUpdate ( $table, $prefix, $deletions, $insertions)
 Update a table by doing a delete query then an insert query. More...
 
 invalidateCategories ( $cats)
 
 invalidateImageDescriptions (array $images)
 
 invalidateProperties ( $changed)
 Invalidate any necessary link lists related to page property changes. More...
 
 updateCategoryCounts (array $added, array $deleted)
 Update all the appropriate counts in the category table. More...
 
 updateLinksTimestamp ()
 Update links table freshness. More...
 

Private Attributes

IDatabase $db
 
null array $externalLinkDeletions = null
 Deleted external links if calculated. More...
 
null array [] $externalLinkInsertions = null
 Added external links if calculated. More...
 
null array $linkDeletions = null
 Deleted links if calculated. More...
 
array [] null $linkInsertions = null
 Added links if calculated. More...
 
Revision $mRevision
 Revision for which this update has been triggered. More...
 
null array $propertyDeletions = null
 Deleted properties if calculated. More...
 
null array $propertyInsertions = null
 Added properties if calculated. More...
 
User null $user
 

Additional Inherited Members

- Protected Attributes inherited from DataUpdate
string $causeAction = 'unknown'
 Short update cause action description. More...
 
string $causeAgent = 'unknown'
 Short update cause user description. More...
 
mixed $ticket
 Result from LBFactory::getEmptyTransactionTicket() More...
 

Detailed Description

Class the manages updates of *_link tables as well as similar extension-managed tables.

Note
: LinksUpdate is managed by DeferredUpdates::execute(). Do not run this in a transaction.

See docs/deferred.txt

Definition at line 35 of file LinksUpdate.php.

Constructor & Destructor Documentation

◆ __construct()

LinksUpdate::__construct ( Title  $title,
ParserOutput  $parserOutput,
  $recursive = true 
)
Parameters
Title$titleTitle of the page we're updating
ParserOutput$parserOutputOutput from a full parse of this page
bool$recursiveQueue jobs for recursive updates?
Exceptions
MWException

Definition at line 125 of file LinksUpdate.php.

References $title, Title\getArticleID(), ParserOutput\getCategories(), ParserOutput\getExternalLinks(), ParserOutput\getImages(), ParserOutput\getInterwikiLinks(), ParserOutput\getLanguageLinks(), ParserOutput\getLinks(), ParserOutput\getProperties(), ParserOutput\getTemplates(), and Hooks\run().

Member Function Documentation

◆ acquirePageLock()

static LinksUpdate::acquirePageLock ( IDatabase  $dbw,
  $pageId,
  $why = 'atomicity' 
)
static

Acquire a session-level lock for performing link table updates for a page on a DB.

Parameters
IDatabase$dbw
int$pageId
string$whyOne of (job, atomicity)
Returns
ScopedCallback|null
Since
1.27

Definition at line 218 of file LinksUpdate.php.

References Wikimedia\Rdbms\IDatabase\getScopedLockAndFlush().

Referenced by DeleteLinksJob\run(), and RefreshLinksJob\runForTitle().

◆ doIncrementalUpdate()

◆ doUpdate()

LinksUpdate::doUpdate ( )

Update link tables with outgoing links from an updated article.

Note
this is managed by DeferredUpdates::execute(). Do not run this in a transaction.

Implements DeferrableUpdate.

Definition at line 180 of file LinksUpdate.php.

References DeferredUpdates\addUpdate(), doIncrementalUpdate(), getDB(), and Hooks\run().

◆ getAddedExternalLinks()

LinksUpdate::getAddedExternalLinks ( )

Fetch external links added by this LinksUpdate.

Only available after the update is complete.

Since
1.33
Returns
null|array Array of Strings

Definition at line 1143 of file LinksUpdate.php.

◆ getAddedLinks()

LinksUpdate::getAddedLinks ( )

Fetch page links added by this LinksUpdate.

Only available after the update is complete.

Since
1.22
Returns
null|array Array of Titles

Definition at line 1106 of file LinksUpdate.php.

References Title\makeTitle().

◆ getAddedProperties()

LinksUpdate::getAddedProperties ( )

Fetch page properties added by this LinksUpdate.

Only available after the update is complete.

Since
1.28
Returns
null|array

Definition at line 1173 of file LinksUpdate.php.

References $propertyInsertions.

◆ getCategoryDeletions()

LinksUpdate::getCategoryDeletions (   $existing)
private

Given an array of existing categories, returns those categories which are not in $this and thus should be deleted.

Parameters
array$existing
Returns
array

Definition at line 833 of file LinksUpdate.php.

Referenced by doIncrementalUpdate().

◆ getCategoryInsertions()

LinksUpdate::getCategoryInsertions (   $existing = [])
private

Get an array of category insertions.

Parameters
array$existingMapping existing category names to sort keys. If both match a link in $this, the link will be omitted from the output
Returns
array

Definition at line 620 of file LinksUpdate.php.

References $mId, $type, $wgCategoryCollation, getDB(), Title\makeTitleSafe(), NS_CATEGORY, and Collation\singleton().

Referenced by doIncrementalUpdate().

◆ getDB()

◆ getExistingCategories()

LinksUpdate::getExistingCategories ( )
private

Get an array of existing categories, with the name in the key and sort key in the value.

Returns
array

Definition at line 950 of file LinksUpdate.php.

References $res, and getDB().

Referenced by doIncrementalUpdate().

◆ getExistingExternals()

LinksUpdate::getExistingExternals ( )
private

Get an array of existing external links, URLs in the keys.

Returns
array

Definition at line 934 of file LinksUpdate.php.

References $res, and getDB().

Referenced by doIncrementalUpdate().

◆ getExistingImages()

LinksUpdate::getExistingImages ( )
private

Get an array of existing images, image names in the keys.

Returns
array

Definition at line 918 of file LinksUpdate.php.

References $res, and getDB().

Referenced by doIncrementalUpdate().

◆ getExistingInterlangs()

LinksUpdate::getExistingInterlangs ( )
private

Get an array of existing interlanguage links, with the language code in the key and the title in the value.

Returns
array

Definition at line 967 of file LinksUpdate.php.

References $res, and getDB().

Referenced by doIncrementalUpdate().

◆ getExistingInterwikis()

LinksUpdate::getExistingInterwikis ( )
private

Get an array of existing inline interwiki links, as a 2-D array.

Returns
array [ prefix => [ dbkey => 1 ] ]

Definition at line 982 of file LinksUpdate.php.

References $res, and getDB().

Referenced by doIncrementalUpdate().

◆ getExistingLinks()

LinksUpdate::getExistingLinks ( )
private

Get an array of existing links, as a 2-D array.

Returns
array

Definition at line 880 of file LinksUpdate.php.

References $res, and getDB().

Referenced by doIncrementalUpdate().

◆ getExistingProperties()

LinksUpdate::getExistingProperties ( )
private

Get an array of existing categories, with the name in the key and sort key in the value.

Returns
array Array of property names and values

Definition at line 1001 of file LinksUpdate.php.

References $res, and getDB().

Referenced by doIncrementalUpdate().

◆ getExistingTemplates()

LinksUpdate::getExistingTemplates ( )
private

Get an array of existing templates, as a 2-D array.

Returns
array

Definition at line 899 of file LinksUpdate.php.

References $res, and getDB().

Referenced by doIncrementalUpdate().

◆ getExternalDeletions()

LinksUpdate::getExternalDeletions (   $existing)
private

Given an array of existing external links, returns those links which are not in $this and thus should be deleted.

Parameters
array$existing
Returns
array

Definition at line 823 of file LinksUpdate.php.

Referenced by doIncrementalUpdate().

◆ getExternalInsertions()

LinksUpdate::getExternalInsertions (   $existing = [])
private

Get an array of externallinks insertions.

Skips the names specified in $existing

Parameters
array$existing
Returns
array[]

Definition at line 595 of file LinksUpdate.php.

References $mId, and LinkFilter\makeIndexes().

Referenced by doIncrementalUpdate().

◆ getImageDeletions()

LinksUpdate::getImageDeletions (   $existing)
private

Given an array of existing images, returns those images which are not in $this and thus should be deleted.

Parameters
array$existing
Returns
array

Definition at line 813 of file LinksUpdate.php.

Referenced by doIncrementalUpdate().

◆ getImageInsertions()

LinksUpdate::getImageInsertions (   $existing = [])
private

Get an array of image insertions Skips the names specified in $existing.

Parameters
array$existing
Returns
array

Definition at line 576 of file LinksUpdate.php.

References $mId.

Referenced by doIncrementalUpdate().

◆ getImages()

LinksUpdate::getImages ( )

Return the list of images used as generated by the parser.

Returns
array

Definition at line 1033 of file LinksUpdate.php.

References $mImages.

◆ getInterlangDeletions()

LinksUpdate::getInterlangDeletions (   $existing)
private

Given an array of existing interlanguage links, returns those links which are not in $this and thus should be deleted.

Parameters
array$existing
Returns
array

Definition at line 843 of file LinksUpdate.php.

Referenced by doIncrementalUpdate().

◆ getInterlangInsertions()

LinksUpdate::getInterlangInsertions (   $existing = [])
private

Get an array of interlanguage link insertions.

Parameters
array$existingMapping existing language codes to titles
Returns
array

Definition at line 660 of file LinksUpdate.php.

References $lang, $mId, and $title.

Referenced by doIncrementalUpdate().

◆ getInterwikiDeletions()

LinksUpdate::getInterwikiDeletions (   $existing)
private

Given an array of existing interwiki links, returns those links which are not in $this and thus should be deleted.

Parameters
array$existing
Returns
array

Definition at line 862 of file LinksUpdate.php.

Referenced by doIncrementalUpdate().

◆ getInterwikiInsertions()

LinksUpdate::getInterwikiInsertions (   $existing = [])
private

Get an array of interwiki insertions for passing to the DB Skips the titles specified by the 2-D array $existing.

Parameters
array$existing
Returns
array

Definition at line 750 of file LinksUpdate.php.

References $mId.

Referenced by doIncrementalUpdate().

◆ getLinkDeletions()

LinksUpdate::getLinkDeletions (   $existing)
private

Given an array of existing links, returns those links which are not in $this and thus should be deleted.

Parameters
array$existing
Returns
array

Definition at line 775 of file LinksUpdate.php.

Referenced by doIncrementalUpdate().

◆ getLinkInsertions()

LinksUpdate::getLinkInsertions (   $existing = [])
private

Get an array of pagelinks insertions for passing to the DB Skips the titles specified by the 2-D array $existing.

Parameters
array$existing
Returns
array[] -return array<int,array{pl_from:int,pl_from_namespace:int,pl_namespace:int,pl_title:string}>

Definition at line 529 of file LinksUpdate.php.

References $mId.

Referenced by doIncrementalUpdate().

◆ getPagePropRowData()

LinksUpdate::getPagePropRowData (   $prop)
private

Returns an associative array to be used for inserting a row into the page_props table.

Besides the given property name, this will include the page id from $this->mId and any property value from $this->mProperties.

The array returned will include the pp_sortkey field if this is present in the database (as indicated by $wgPagePropsHaveSortkey). The sortkey value is currently determined by getPropertySortKeyValue().

Note
this assumes that $this->mProperties[$prop] is defined.
Parameters
string$propThe name of the property.
Returns
array

Definition at line 706 of file LinksUpdate.php.

References $mId, $wgPagePropsHaveSortkey, and getPropertySortKeyValue().

Referenced by getPropertyInsertions().

◆ getParserOutput()

LinksUpdate::getParserOutput ( )

Returns parser output.

Since
1.19
Returns
ParserOutput

Definition at line 1025 of file LinksUpdate.php.

References $mParserOutput.

◆ getPropertyDeletions()

LinksUpdate::getPropertyDeletions (   $existing)
private

Get array of properties which should be deleted.

Parameters
array$existing
Returns
array

Definition at line 852 of file LinksUpdate.php.

Referenced by doIncrementalUpdate().

◆ getPropertyInsertions()

LinksUpdate::getPropertyInsertions (   $existing = [])

Get an array of page property insertions.

Parameters
array$existing
Returns
array

Definition at line 679 of file LinksUpdate.php.

References getPagePropRowData().

Referenced by doIncrementalUpdate().

◆ getPropertySortKeyValue()

LinksUpdate::getPropertySortKeyValue (   $value)
private

Determines the sort key for the given property value.

This will return $value if it is a float or int, 1 or resp. 0 if it is a bool, and null otherwise.

Note
In the future, we may allow the sortkey to be specified explicitly in ParserOutput::setProperty.
Parameters
mixed$value
Returns
float|null

Definition at line 736 of file LinksUpdate.php.

Referenced by getPagePropRowData().

◆ getRemovedExternalLinks()

LinksUpdate::getRemovedExternalLinks ( )

Fetch external links removed by this LinksUpdate.

Only available after the update is complete.

Since
1.33
Returns
null|string[]

Definition at line 1160 of file LinksUpdate.php.

◆ getRemovedLinks()

LinksUpdate::getRemovedLinks ( )

Fetch page links removed by this LinksUpdate.

Only available after the update is complete.

Since
1.22
Returns
null|array Array of Titles

Definition at line 1123 of file LinksUpdate.php.

References $title, and Title\makeTitle().

◆ getRemovedProperties()

LinksUpdate::getRemovedProperties ( )

Fetch page properties removed by this LinksUpdate.

Only available after the update is complete.

Since
1.28
Returns
null|array

Definition at line 1183 of file LinksUpdate.php.

References $propertyDeletions.

◆ getRevision()

LinksUpdate::getRevision ( )
Since
1.28
Returns
null|Revision

Definition at line 1052 of file LinksUpdate.php.

References $mRevision.

◆ getTemplateDeletions()

LinksUpdate::getTemplateDeletions (   $existing)
private

Given an array of existing templates, returns those templates which are not in $this and thus should be deleted.

Parameters
array$existing
Returns
array

Definition at line 794 of file LinksUpdate.php.

Referenced by doIncrementalUpdate().

◆ getTemplateInsertions()

LinksUpdate::getTemplateInsertions (   $existing = [])
private

Get an array of template insertions.

Like getLinkInsertions()

Parameters
array$existing
Returns
array

Definition at line 553 of file LinksUpdate.php.

References $mId.

Referenced by doIncrementalUpdate().

◆ getTitle()

LinksUpdate::getTitle ( )

Return the title object of the page being updated.

Returns
Title

Definition at line 1016 of file LinksUpdate.php.

References $mTitle.

◆ getTriggeringUser()

LinksUpdate::getTriggeringUser ( )
Since
1.27
Returns
null|User

Definition at line 1070 of file LinksUpdate.php.

References $user.

◆ incrTableUpdate()

LinksUpdate::incrTableUpdate (   $table,
  $prefix,
  $deletions,
  $insertions 
)
private

Update a table by doing a delete query then an insert query.

Parameters
string$tableTable name
string$prefixField name prefix
array$deletions
array$insertionsRows to insert

Definition at line 444 of file LinksUpdate.php.

References $mId, getDB(), and Hooks\run().

Referenced by doIncrementalUpdate().

◆ invalidateCategories()

LinksUpdate::invalidateCategories (   $cats)
private
Parameters
array$cats

Definition at line 391 of file LinksUpdate.php.

References getDB(), PurgeJobUtils\invalidatePages(), and NS_CATEGORY.

Referenced by doIncrementalUpdate().

◆ invalidateImageDescriptions()

LinksUpdate::invalidateImageDescriptions ( array  $images)
private
Parameters
array$images

Definition at line 431 of file LinksUpdate.php.

References getDB(), PurgeJobUtils\invalidatePages(), and NS_FILE.

Referenced by doIncrementalUpdate().

◆ invalidateProperties()

LinksUpdate::invalidateProperties (   $changed)
private

Invalidate any necessary link lists related to page property changes.

Parameters
array$changed

Definition at line 1078 of file LinksUpdate.php.

References $wgPagePropLinkInvalidations, HTMLCacheUpdateJob\newForBacklinks(), and JobQueueGroup\singleton().

Referenced by doIncrementalUpdate().

◆ isRecursive()

LinksUpdate::isRecursive ( )

Whether or not this LinksUpdate will also update pages which transclude the current page or otherwise depend on it.

Returns
bool

Definition at line 1219 of file LinksUpdate.php.

References $mRecursive.

◆ queueRecursiveJobs()

LinksUpdate::queueRecursiveJobs ( )
protected

Queue recursive jobs for this page.

Which means do LinksUpdate on all pages that include the current page, using the job queue.

Definition at line 333 of file LinksUpdate.php.

References $title, DataUpdate\getCauseAction(), DataUpdate\getCauseAgent(), RefreshLinksJob\newPrioritized(), NS_FILE, and JobQueueGroup\singleton().

Referenced by doIncrementalUpdate().

◆ queueRecursiveJobsForTable()

static LinksUpdate::queueRecursiveJobsForTable ( Title  $title,
  $table,
  $action = 'unknown',
  $userName = 'unknown' 
)
static

Queue a RefreshLinks job for any table.

Parameters
Title$titleTitle to do job for
string$tableTable to use (e.g. 'templatelinks')
string$actionTriggering action
string$userNameTriggering user name

Definition at line 370 of file LinksUpdate.php.

References $job, Title\getBacklinkCache(), Job\newRootJobParams(), and JobQueueGroup\singleton().

Referenced by WikiPage\doDeleteUpdates(), and LocalFile\recordUpload2().

◆ setRevision()

LinksUpdate::setRevision ( Revision  $revision)

Set the revision corresponding to this LinksUpdate.

Since
1.27
Parameters
Revision$revision

Definition at line 1044 of file LinksUpdate.php.

◆ setTriggeringUser()

LinksUpdate::setTriggeringUser ( User  $user)

Set the User who triggered this LinksUpdate.

Since
1.27
Parameters
User$user

Definition at line 1062 of file LinksUpdate.php.

References $user.

◆ updateCategoryCounts()

LinksUpdate::updateCategoryCounts ( array  $added,
array  $deleted 
)
private

Update all the appropriate counts in the category table.

Parameters
array$addedAssociative array of category name => sort key
array$deletedAssociative array of category name => sort key

Definition at line 402 of file LinksUpdate.php.

References $wgUpdateRowsPerQuery, WikiPage\factory(), and getDB().

Referenced by doIncrementalUpdate().

◆ updateLinksTimestamp()

LinksUpdate::updateLinksTimestamp ( )
private

Update links table freshness.

Definition at line 1190 of file LinksUpdate.php.

References getDB().

Referenced by doIncrementalUpdate().

Member Data Documentation

◆ $db

IDatabase LinksUpdate::$db
private

Definition at line 117 of file LinksUpdate.php.

Referenced by getDB().

◆ $externalLinkDeletions

null array LinksUpdate::$externalLinkDeletions = null
private

Deleted external links if calculated.

Definition at line 99 of file LinksUpdate.php.

◆ $externalLinkInsertions

null array [] LinksUpdate::$externalLinkInsertions = null
private

Added external links if calculated.

Definition at line 94 of file LinksUpdate.php.

◆ $linkDeletions

null array LinksUpdate::$linkDeletions = null
private

Deleted links if calculated.

Definition at line 89 of file LinksUpdate.php.

◆ $linkInsertions

array [] null LinksUpdate::$linkInsertions = null
private

Added links if calculated.

-var array<int,array{pl_from:int,pl_from_namespace:int,pl_namespace:int,pl_title:string}>|null

Definition at line 84 of file LinksUpdate.php.

◆ $mCategories

array LinksUpdate::$mCategories

Map of category names to sort keys.

Definition at line 63 of file LinksUpdate.php.

◆ $mExternals

array LinksUpdate::$mExternals

URLs of external links, array key only.

Definition at line 60 of file LinksUpdate.php.

◆ $mId

◆ $mImages

array LinksUpdate::$mImages

DB keys of the images used, in the array key only.

Definition at line 54 of file LinksUpdate.php.

Referenced by getImages().

◆ $mInterlangs

array LinksUpdate::$mInterlangs

Map of language codes to titles.

Definition at line 66 of file LinksUpdate.php.

◆ $mInterwikis

array LinksUpdate::$mInterwikis

2-D map of (prefix => DBK => 1)

Definition at line 69 of file LinksUpdate.php.

◆ $mLinks

int [][] LinksUpdate::$mLinks

Map of title strings to IDs for the links in the document -var array<int,array<string,int>>

Definition at line 51 of file LinksUpdate.php.

◆ $mParserOutput

ParserOutput LinksUpdate::$mParserOutput

Definition at line 45 of file LinksUpdate.php.

Referenced by getParserOutput().

◆ $mProperties

array LinksUpdate::$mProperties

Map of arbitrary name to value.

Definition at line 72 of file LinksUpdate.php.

◆ $mRecursive

bool LinksUpdate::$mRecursive

Whether to queue jobs for recursive updates.

Definition at line 75 of file LinksUpdate.php.

Referenced by isRecursive().

◆ $mRevision

Revision LinksUpdate::$mRevision
private

Revision for which this update has been triggered.

Definition at line 78 of file LinksUpdate.php.

Referenced by getRevision().

◆ $mTemplates

array LinksUpdate::$mTemplates

Map of title strings to IDs for the template references, including broken ones.

Definition at line 57 of file LinksUpdate.php.

◆ $mTitle

Title LinksUpdate::$mTitle

Title object of the article linked from.

Definition at line 42 of file LinksUpdate.php.

Referenced by LinksDeletionUpdate\doIncrementalUpdate(), and getTitle().

◆ $propertyDeletions

null array LinksUpdate::$propertyDeletions = null
private

Deleted properties if calculated.

Definition at line 109 of file LinksUpdate.php.

Referenced by getRemovedProperties().

◆ $propertyInsertions

null array LinksUpdate::$propertyInsertions = null
private

Added properties if calculated.

Definition at line 104 of file LinksUpdate.php.

Referenced by doIncrementalUpdate(), and getAddedProperties().

◆ $user

User null LinksUpdate::$user
private

Definition at line 114 of file LinksUpdate.php.

Referenced by getTriggeringUser(), and setTriggeringUser().


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