MediaWiki REL1_41
MediaWiki\Linker\LinksMigration Class Reference

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

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.
 
 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.
 
 getTitleFields ( $table)
 

Static Public Attributes

static $mapping
 
static $prefixToTableMapping
 

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 68 of file LinksMigration.php.

Member Function Documentation

◆ 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 80 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 107 of file LinksMigration.php.

References SCHEMA_COMPAT_READ_NEW.

◆ getTitleFields()

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

Definition at line 140 of file LinksMigration.php.

References SCHEMA_COMPAT_READ_NEW.

Referenced by ApiQueryBacklinks\__construct().

Member Data Documentation

◆ $mapping

MediaWiki\Linker\LinksMigration::$mapping
static
Initial value:
= [
'templatelinks' => [
'page_id' => 'tl_from',
'ns' => 'tl_namespace',
'title' => 'tl_title',
'target_id' => 'tl_target_id',
'deprecated_configs' => [ SCHEMA_COMPAT_OLD ],
],
'pagelinks' => [
'page_id' => 'pl_from',
'ns' => 'pl_namespace',
'title' => 'pl_title',
'target_id' => 'pl_target_id',
'deprecated_configs' => [],
],
]
const SCHEMA_COMPAT_OLD
Definition Defines.php:275
const PageLinksSchemaMigrationStage
Name constant for the PageLinksSchemaMigrationStage setting, for use with Config::get()
const TemplateLinksSchemaMigrationStage
Name constant for the TemplateLinksSchemaMigrationStage setting, for use with Config::get()

Definition at line 40 of file LinksMigration.php.

◆ $prefixToTableMapping

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

Definition at line 59 of file LinksMigration.php.


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