|
MediaWiki master
|
Help migrate core and extension code with the actor table migration. More...
Inherited by MediaWiki\User\ActorMigration.

Public Member Functions | |
| __construct ( $fieldInfos, $stage, ActorStoreFactory $actorStoreFactory, $options=[]) | |
| getInsertValues (IDatabase $dbw, $key, UserIdentity $user) | |
| Get UPDATE fields for the actor. | |
| getJoin ( $key) | |
| Get SELECT fields and joins for the actor key. | |
| getWhere (IReadableDatabase $db, $key, $users, $useId=true) | |
| Get WHERE condition for the actor. | |
| isAnon ( $field) | |
| Return an SQL condition to test if a user field is anonymous. | |
| isNotAnon ( $field) | |
| Return an SQL condition to test if a user field is non-anonymous. | |
| setForImport (bool $forImport) | |
Static Public Member Functions | |
| static | newMigrationForImport () |
| Get an instance that allows IP actor creation. | |
Protected Member Functions | |
| checkDeprecation ( $key) | |
| Issue deprecation warning/error as appropriate. | |
| getActorNormalization ( $domainId) | |
| getFieldInfo ( $key) | |
| Get config information about a field. | |
| getInstanceName () | |
| Get a name for this instance to use in error messages. | |
Protected Attributes | |
| ActorStoreFactory | $actorStoreFactory |
Help migrate core and extension code with the actor table migration.
Definition at line 22 of file ActorMigrationBase.php.
| MediaWiki\User\ActorMigrationBase::__construct | ( | $fieldInfos, | |
| $stage, | |||
| ActorStoreFactory | $actorStoreFactory, | ||
| $options = [] ) |
| array | $fieldInfos | An array of associative arrays, giving configuration information about fields which are being migrated. Subkeys are:
|
| int | $stage | The migration stage. This is a combination of SCHEMA_COMPAT_* flags:
|
| ActorStoreFactory | $actorStoreFactory | |
| array | $options | Array of other options. May contain:
|
Definition at line 66 of file ActorMigrationBase.php.
References MediaWiki\User\ActorMigrationBase\$actorStoreFactory, SCHEMA_COMPAT_READ_MASK, SCHEMA_COMPAT_READ_NEW, SCHEMA_COMPAT_READ_OLD, SCHEMA_COMPAT_WRITE_MASK, SCHEMA_COMPAT_WRITE_NEW, and SCHEMA_COMPAT_WRITE_OLD.
|
protected |
Issue deprecation warning/error as appropriate.
| string | $key |
Definition at line 148 of file ActorMigrationBase.php.
References MediaWiki\User\ActorMigrationBase\getFieldInfo(), and wfDeprecated().
Referenced by MediaWiki\User\ActorMigrationBase\getInsertValues(), MediaWiki\User\ActorMigrationBase\getJoin(), and MediaWiki\User\ActorMigrationBase\getWhere().
|
protected |
| string | $domainId |
Definition at line 363 of file ActorMigrationBase.php.
Referenced by MediaWiki\User\ActorMigrationBase\getInsertValues(), and MediaWiki\User\ActorMigrationBase\getWhere().
|
protected |
Get config information about a field.
| string | $key |
Definition at line 114 of file ActorMigrationBase.php.
References MediaWiki\User\ActorMigrationBase\getInstanceName().
Referenced by MediaWiki\User\ActorMigrationBase\checkDeprecation().
| MediaWiki\User\ActorMigrationBase::getInsertValues | ( | IDatabase | $dbw, |
| $key, | |||
| UserIdentity | $user ) |
Get UPDATE fields for the actor.
| IDatabase | $dbw | Database to use for creating an actor ID, if necessary |
| string | $key | A key such as "rev_user" identifying the actor field being fetched. |
| UserIdentity | $user | User to set in the update |
$values to IDatabase->update() or $a to IDatabase->insert() Reimplemented in MediaWiki\User\ActorMigration.
Definition at line 249 of file ActorMigrationBase.php.
References MediaWiki\User\ActorMigrationBase\checkDeprecation(), MediaWiki\User\ActorMigrationBase\getActorNormalization(), Wikimedia\Rdbms\IReadableDatabase\getDomainID(), MediaWiki\User\UserIdentity\getId(), MediaWiki\User\UserIdentity\getName(), SCHEMA_COMPAT_WRITE_NEW, and SCHEMA_COMPAT_WRITE_OLD.
|
protected |
Get a name for this instance to use in error messages.
\ReflectionException
Definition at line 132 of file ActorMigrationBase.php.
Referenced by MediaWiki\User\ActorMigrationBase\getFieldInfo().
| MediaWiki\User\ActorMigrationBase::getJoin | ( | $key | ) |
Get SELECT fields and joins for the actor key.
| string | $key | A key such as "rev_user" identifying the actor field being fetched. |
$table to IDatabase->select() or SelectQueryBuilder::tables$vars to IDatabase->select() or SelectQueryBuilder::fields$join_conds to IDatabase->select() or SelectQueryBuilder::joinConds All tables, fields, and joins are aliased, so + is safe to use. Reimplemented in MediaWiki\User\ActorMigration.
Definition at line 206 of file ActorMigrationBase.php.
References MediaWiki\User\ActorMigrationBase\checkDeprecation(), and SCHEMA_COMPAT_READ_OLD.
| MediaWiki\User\ActorMigrationBase::getWhere | ( | IReadableDatabase | $db, |
| $key, | |||
| $users, | |||
| $useId = true ) |
Get WHERE condition for the actor.
| IReadableDatabase | $db | Database to use for quoting and list-making |
| string | $key | A key such as "rev_user" identifying the actor field being fetched. |
| UserIdentity | UserIdentity[] | null | false | $users | Users to test for. Passing null, false, or the empty array will return 'conds' that never match, and an empty array for 'orconds'. |
| bool | $useId | If false, don't try to query by the user ID. Intended for use with rc_user since it has an index on (rc_user_text,rc_timestamp) but not (rc_user,rc_timestamp). |
$table to IDatabase->select() or SelectQueryBuilder::tables$cond to IDatabase->select() or SelectQueryBuilder::conds$join_conds to IDatabase->select() or SelectQueryBuilder::joinConds All tables and joins are aliased, so + is safe to use. Reimplemented in MediaWiki\User\ActorMigration.
Definition at line 289 of file ActorMigrationBase.php.
References MediaWiki\User\ActorMigrationBase\checkDeprecation(), MediaWiki\User\ActorMigrationBase\getActorNormalization(), Wikimedia\Rdbms\IReadableDatabase\getDomainID(), Wikimedia\Rdbms\Platform\ISQLPlatform\makeList(), and SCHEMA_COMPAT_READ_NEW.
| MediaWiki\User\ActorMigrationBase::isAnon | ( | $field | ) |
Return an SQL condition to test if a user field is anonymous.
| string | $field | Field name or SQL fragment |
Definition at line 169 of file ActorMigrationBase.php.
References SCHEMA_COMPAT_READ_NEW.
| MediaWiki\User\ActorMigrationBase::isNotAnon | ( | $field | ) |
Return an SQL condition to test if a user field is non-anonymous.
| string | $field | Field name or SQL fragment |
Definition at line 178 of file ActorMigrationBase.php.
References SCHEMA_COMPAT_READ_NEW.
|
static |
Get an instance that allows IP actor creation.
Reimplemented in MediaWiki\User\ActorMigration.
Definition at line 102 of file ActorMigrationBase.php.
| MediaWiki\User\ActorMigrationBase::setForImport | ( | bool | $forImport | ) |
| bool | $forImport |
Definition at line 355 of file ActorMigrationBase.php.
|
protected |
Definition at line 32 of file ActorMigrationBase.php.
Referenced by MediaWiki\User\ActorMigrationBase\__construct(), and MediaWiki\User\ActorMigration\__construct().