MediaWiki master
ActorMigration.php
Go to the documentation of this file.
1<?php
2
3namespace MediaWiki\User;
4
8
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
61 parent::__construct(
62 self::FIELD_INFOS,
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}
99
101class_alias( ActorMigration::class, 'ActorMigration' );
const SCHEMA_COMPAT_NEW
Definition Defines.php:288
Service locator for MediaWiki core services.
static getInstance()
Returns the global default instance of the top level service locator.
This abstract base class helps migrate core and extension code to use the actor table.
This is not intended to be a long-term part of MediaWiki; it will be deprecated and removed once acto...
const FIELD_INFOS
Field information.
static newMigrationForImport()
Static constructor.
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...
const MIGRATION_STAGE_SCHEMA_COMPAT
Constant for extensions to feature-test whether $wgActorTableSchemaMigrationStage (in MW <1....
static newMigration()
Static constructor.
getJoin( $key)
Get SELECT fields and joins for the actor key.array[] With three keys:tables: (string[]) to include i...
getInsertValues(IDatabase $dbw, $key, UserIdentity $user)
Get UPDATE fields for the actor.array to merge into $values to IDatabase->update() or $a to IDatabase...
__construct(ActorStoreFactory $actorStoreFactory)
Interface for objects representing user identity.
Basic database interface for live and lazy-loaded relation database handles.
Definition IDatabase.php:36
A database connection without write operations.
Utility class for bot passwords.