MediaWiki  master
MediaWiki\Linker\LinksMigration Class Reference

Service for compat reading of links tables. More...

Collaboration diagram for MediaWiki\Linker\LinksMigration:

Public Member Functions

 __construct (Config $config, LinkTargetLookup $linktargetLookup)
 
 getLinksConditions (string $table, LinkTarget $linkTarget)
 Return the conditions to be used in querying backlinks to a page. More...
 
 getQueryInfo (string $table, string $joinTable='linktarget', string $joinType='JOIN')
 Return the query to be used when you want to or from a group of pages. More...
 
 getTitleFields ( $table)
 

Static Public Attributes

static $mapping
 
static $prefixToTableMapping
 

Private Member Functions

 assertMapping (string $table)
 

Private Attributes

Config $config
 
LinkTargetLookup $linkTargetLookup
 

Detailed Description

Service for compat reading of links tables.

Since
1.39

Definition at line 32 of file LinksMigration.php.

Constructor & Destructor Documentation

◆ __construct()

MediaWiki\Linker\LinksMigration::__construct ( Config  $config,
LinkTargetLookup  $linktargetLookup 
)
Parameters
Config$config
LinkTargetLookup$linktargetLookup

Definition at line 58 of file LinksMigration.php.

References MediaWiki\Linker\LinksMigration\$config.

Member Function Documentation

◆ assertMapping()

MediaWiki\Linker\LinksMigration::assertMapping ( string  $table)
private

Definition at line 136 of file LinksMigration.php.

◆ getLinksConditions()

MediaWiki\Linker\LinksMigration::getLinksConditions ( string  $table,
LinkTarget  $linkTarget 
)

Return the conditions to be used in querying backlinks to a page.

Parameters
string$table
LinkTarget$linkTarget
Returns
array

Definition at line 70 of file LinksMigration.php.

◆ getQueryInfo()

MediaWiki\Linker\LinksMigration::getQueryInfo ( string  $table,
string  $joinTable = 'linktarget',
string  $joinType = 'JOIN' 
)

Return the query to be used when you want to or from a group of pages.

Parameters
string$table
string$joinTabletable to end the join chain. Most of the time it's linktarget
string$joinType
Returns
array

Definition at line 93 of file LinksMigration.php.

References SCHEMA_COMPAT_READ_NEW.

◆ getTitleFields()

MediaWiki\Linker\LinksMigration::getTitleFields (   $table)

Definition at line 126 of file LinksMigration.php.

References SCHEMA_COMPAT_READ_NEW.

Member Data Documentation

◆ $config

Config MediaWiki\Linker\LinksMigration::$config
private

Definition at line 35 of file LinksMigration.php.

Referenced by MediaWiki\Linker\LinksMigration\__construct().

◆ $linkTargetLookup

LinkTargetLookup MediaWiki\Linker\LinksMigration::$linkTargetLookup
private

Definition at line 38 of file LinksMigration.php.

◆ $mapping

MediaWiki\Linker\LinksMigration::$mapping
static
Initial value:
= [
'templatelinks' => [
'page_id' => 'tl_from',
'ns' => 'tl_namespace',
'title' => 'tl_title',
'target_id' => 'tl_target_id',
],
]
const TemplateLinksSchemaMigrationStage
Name constant for the TemplateLinksSchemaMigrationStage setting, for use with Config::get()

Definition at line 40 of file LinksMigration.php.

Referenced by MigrateLinksTable\doDBUpdates().

◆ $prefixToTableMapping

MediaWiki\Linker\LinksMigration::$prefixToTableMapping
static
Initial value:
= [
'tl' => 'templatelinks'
]

Definition at line 50 of file LinksMigration.php.


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