9use InvalidArgumentException;
69foreach (
$data as $k => $v ) {
70if ( str_starts_with( $k,
'_' ) ) {
71thrownew InvalidArgumentException(
'Keys in $data beginning with "_" are reserved' );
76if ( $comment instanceof
Message ) {
78// Avoid $wgForceUIMsgAsContentMsg 80 ->setInterfaceMessageFlag(
true )
89// This alias can not be removed, because serialized instances of this class are stored in Echo 90// tables, until we either migrate to JSON serialization (T325703) or expire those events (T383948). 92class_alias( CommentStoreComment::class,
'CommentStoreComment' );
Value object for a comment stored by CommentStore.
__construct( $id, string $text, ?Message $message=null, ?array $data=null)
static newUnsavedComment( $comment, ?array $data=null)
Create a new, unsaved CommentStoreComment.
int null $id
Comment ID, if any.
string $text
Text version of the comment.
Message $message
Message version of the comment.
array null $data
Structured data of the comment.
Variant of the Message class.
Service locator for MediaWiki core services.
static getInstance()
Returns the global default instance of the top level service locator.
The Message class deals with fetching and processing of interface message into a variety of formats.
inLanguage( $lang)
Request the message in any language that is supported.
static plaintextParam( $plaintext)