mirror of
https://github.com/wbbaddons/Tims-Chat.git
synced 2025-01-22 02:00:40 +00:00
Adding PHPDoc for ChatMessage::jsonify
This commit is contained in:
parent
ac3dfbde0e
commit
4cf51f74be
8
file/lib/data/chat/message/ChatMessage.class.php
Normal file → Executable file
8
file/lib/data/chat/message/ChatMessage.class.php
Normal file → Executable file
@ -74,7 +74,7 @@ class ChatMessage extends \wcf\data\DatabaseObject {
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the unformatted username
|
||||
* Returns the unformatted username.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
@ -83,6 +83,11 @@ class ChatMessage extends \wcf\data\DatabaseObject {
|
||||
return $this->username;
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts this message into json-form.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function jsonify() {
|
||||
return \wcf\util\JSON::encode(array(
|
||||
'formattedUsername' => $this->getFormattedUsername(),
|
||||
@ -94,6 +99,5 @@ class ChatMessage extends \wcf\data\DatabaseObject {
|
||||
'receiver' => $this->receiver,
|
||||
'type' => $this->type
|
||||
));
|
||||
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user