MediaWiki master
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 73 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 85 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 112 of file LinksMigration.php.

◆ getTitleFields()

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

Definition at line 145 of file LinksMigration.php.

Referenced by ApiQueryBacklinks\__construct().

Member Data Documentation

◆ $mapping

MediaWiki\Linker\LinksMigration::$mapping
static
Initial value:
= [
'templatelinks' => [
'config' => -1,
'page_id' => 'tl_from',
'ns' => 'tl_namespace',
'title' => 'tl_title',
'target_id' => 'tl_target_id',
'deprecated_configs' => [],
],
'pagelinks' => [
'page_id' => 'pl_from',
'ns' => 'pl_namespace',
'title' => 'pl_title',
'target_id' => 'pl_target_id',
'deprecated_configs' => [
],
],
]
const SCHEMA_COMPAT_WRITE_OLD
Definition Defines.php:275
const SCHEMA_COMPAT_READ_OLD
Definition Defines.php:276
const PageLinksSchemaMigrationStage
Name constant for the PageLinksSchemaMigrationStage 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 64 of file LinksMigration.php.


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