MediaWiki REL1_33
CommentStoreComment Class Reference

CommentStoreComment represents a comment stored by CommentStore. More...

Collaboration diagram for CommentStoreComment:

Public Member Functions

 __construct ( $id, $text, Message $message=null, array $data=null)
 

Static Public Member Functions

static newUnsavedComment ( $comment, array $data=null)
 Create a new, unsaved CommentStoreComment.
 

Public Attributes

array null $data
 Structured data of the comment.
 
int null $id
 Comment ID, if any.
 
Message $message
 Message version of the comment.
 
string $text
 Text version of the comment.
 

Detailed Description

CommentStoreComment represents a comment stored by CommentStore.

The fields should be considered read-only.

Since
1.30

Definition at line 29 of file CommentStoreComment.php.

Constructor & Destructor Documentation

◆ __construct()

CommentStoreComment::__construct ( $id,
$text,
Message $message = null,
array $data = null )
Access:\n private For use by CommentStore only. Use self::newUnsavedComment() instead.
Parameters
int | null$id
string$text
Message | null$message
array | null$data

Definition at line 50 of file CommentStoreComment.php.

References $data, and $id.

Member Function Documentation

◆ newUnsavedComment()

static CommentStoreComment::newUnsavedComment ( $comment,
array $data = null )
static

Create a new, unsaved CommentStoreComment.

Parameters
string | Message | CommentStoreComment$commentComment text or Message object. A CommentStoreComment is also accepted here, in which case it is returned unchanged.
array | null$dataStructured data to store. Keys beginning with '_' are reserved. Ignored if $comment is a CommentStoreComment.
Returns
CommentStoreComment

Definition at line 66 of file CommentStoreComment.php.

References $data, and(), and Message\inLanguage().

Member Data Documentation

◆ $data

array null CommentStoreComment::$data

Structured data of the comment.

Definition at line 41 of file CommentStoreComment.php.

◆ $id

int null CommentStoreComment::$id

Comment ID, if any.

Definition at line 32 of file CommentStoreComment.php.

Referenced by __construct().

◆ $message

Message CommentStoreComment::$message

Message version of the comment.

Might be a RawMessage

Definition at line 38 of file CommentStoreComment.php.

◆ $text

string CommentStoreComment::$text

Text version of the comment.

Definition at line 35 of file CommentStoreComment.php.


The documentation for this class was generated from the following file: