MediaWiki
master
ActorMigration.php
Go to the documentation of this file.
1
<?php
2
3
namespace
MediaWiki\User
;
4
5
use
MediaWiki\MediaWikiServices
;
6
use
Wikimedia\Rdbms\IDatabase
;
7
use
Wikimedia\Rdbms\IReadableDatabase
;
8
19
class
ActorMigration
extends
ActorMigrationBase
{
24
public
const
MIGRATION_STAGE_SCHEMA_COMPAT
= 1;
25
30
public
const
FIELD_INFOS
= [
31
// Deprecated since 1.39
32
'rev_user'
=> [],
33
];
34
39
public
static
function
newMigration
() {
40
return
MediaWikiServices::getInstance
()->getActorMigration();
41
}
42
47
public
static
function
newMigrationForImport
() {
48
$migration =
new
self
(
49
MediaWikiServices::getInstance
()->getActorStoreFactory()
50
);
51
$migration->setForImport(
true
);
52
return
$migration;
53
}
54
60
public
function
__construct
(
ActorStoreFactory
$actorStoreFactory
) {
61
parent::__construct(
62
self::FIELD_INFOS,
63
SCHEMA_COMPAT_NEW
,
64
$actorStoreFactory
65
);
66
}
67
73
public
function
getJoin
( $key ) {
74
return
parent::getJoin( $key );
75
}
76
84
public
function
getWhere
(
IReadableDatabase
$db, $key, $users, $useId =
true
) {
85
return
parent::getWhere( $db, $key, $users, $useId );
86
}
87
94
public
function
getInsertValues
(
IDatabase
$dbw, $key,
UserIdentity
$user ) {
95
return
parent::getInsertValues( $dbw, $key, $user );
96
}
97
98
}
SCHEMA_COMPAT_NEW
const SCHEMA_COMPAT_NEW
Definition
Defines.php:317
MediaWiki\MediaWikiServices
Service locator for MediaWiki core services.
Definition
MediaWikiServices.php:250
MediaWiki\MediaWikiServices\getInstance
static getInstance()
Returns the global default instance of the top level service locator.
Definition
MediaWikiServices.php:338
MediaWiki\User\ActorMigrationBase
Help migrate core and extension code with the actor table migration.
Definition
ActorMigrationBase.php:36
MediaWiki\User\ActorMigrationBase\$actorStoreFactory
ActorStoreFactory $actorStoreFactory
Definition
ActorMigrationBase.php:46
MediaWiki\User\ActorMigration
This is not intended to be a long-term part of MediaWiki; it will be deprecated and removed once acto...
Definition
ActorMigration.php:19
MediaWiki\User\ActorMigration\FIELD_INFOS
const FIELD_INFOS
Field information.
Definition
ActorMigration.php:30
MediaWiki\User\ActorMigration\newMigrationForImport
static newMigrationForImport()
Static constructor.
Definition
ActorMigration.php:47
MediaWiki\User\ActorMigration\getWhere
getWhere(IReadableDatabase $db, $key, $users, $useId=true)
Get WHERE condition for the actor.array With four keys:tables: (string[]) to include in the $table to...
Definition
ActorMigration.php:84
MediaWiki\User\ActorMigration\MIGRATION_STAGE_SCHEMA_COMPAT
const MIGRATION_STAGE_SCHEMA_COMPAT
Constant for extensions to feature-test whether $wgActorTableSchemaMigrationStage (in MW <1....
Definition
ActorMigration.php:24
MediaWiki\User\ActorMigration\newMigration
static newMigration()
Static constructor.
Definition
ActorMigration.php:39
MediaWiki\User\ActorMigration\getJoin
getJoin( $key)
Get SELECT fields and joins for the actor key.array[] With three keys:tables: (string[]) to include i...
Definition
ActorMigration.php:73
MediaWiki\User\ActorMigration\getInsertValues
getInsertValues(IDatabase $dbw, $key, UserIdentity $user)
Get UPDATE fields for the actor.array to merge into $values to IDatabase->update() or $a to IDatabase...
Definition
ActorMigration.php:94
MediaWiki\User\ActorMigration\__construct
__construct(ActorStoreFactory $actorStoreFactory)
Definition
ActorMigration.php:60
MediaWiki\User\ActorStoreFactory
ActorStore factory for any wiki domain.
Definition
ActorStoreFactory.php:38
MediaWiki\User\UserIdentity
Interface for objects representing user identity.
Definition
UserIdentity.php:38
Wikimedia\Rdbms\IDatabase
Interface to a relational database.
Definition
IDatabase.php:45
Wikimedia\Rdbms\IReadableDatabase
A database connection without write operations.
Definition
IReadableDatabase.php:34
MediaWiki\User
Definition
ActorCache.php:21
includes
user
ActorMigration.php
Generated on Thu Mar 27 2025 10:27:25 for MediaWiki by
1.10.0