MediaWiki 1.40.4
CommentStore.php
Go to the documentation of this file.
1<?php
22
23use Language;
25
55 protected const TEMP_TABLES = [
56 'rev_comment' => [
57 'table' => 'revision_comment_temp',
58 'pk' => 'revcomment_rev',
59 'field' => 'revcomment_comment_id',
60 'joinPK' => 'rev_id',
61 'stage' => MIGRATION_OLD,
62 'deprecatedIn' => null,
63 ],
64 ];
65
74 public function __construct( Language $lang, $stage, $tempTableStageOverrides ) {
75 parent::__construct( self::TEMP_TABLES, $lang, $stage );
76
77 foreach ( $tempTableStageOverrides as $key => $stageOverride ) {
78 $this->tempTables[$key]['stage'] = $stageOverride;
79 }
80 }
81
87 public static function getStore() {
88 wfDeprecated( __METHOD__, '1.31' );
89 return MediaWikiServices::getInstance()->getCommentStore();
90 }
91}
92
93class_alias( CommentStore::class, 'CommentStore' );
const MIGRATION_OLD
Definition Defines.php:303
wfDeprecated( $function, $version=false, $component=false, $callerOffset=2)
Logs a warning that a deprecated feature was used.
Base class for language-specific code.
Definition Language.php:56
Handle database storage of comments such as edit summaries and log reasons.
__construct(Language $lang, $stage, $tempTableStageOverrides)
const TEMP_TABLES
Define fields that use temporary tables for transitional purposes Array keys are field names,...
Service locator for MediaWiki core services.
static getInstance()
Returns the global default instance of the top level service locator.
if(!isset( $args[0])) $lang