mirror of
https://github.com/wbbaddons/Tims-Chat.git
synced 2025-01-23 02:10:41 +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
|
* @return string
|
||||||
*/
|
*/
|
||||||
@ -83,6 +83,11 @@ class ChatMessage extends \wcf\data\DatabaseObject {
|
|||||||
return $this->username;
|
return $this->username;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Converts this message into json-form.
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
public function jsonify() {
|
public function jsonify() {
|
||||||
return \wcf\util\JSON::encode(array(
|
return \wcf\util\JSON::encode(array(
|
||||||
'formattedUsername' => $this->getFormattedUsername(),
|
'formattedUsername' => $this->getFormattedUsername(),
|
||||||
@ -94,6 +99,5 @@ class ChatMessage extends \wcf\data\DatabaseObject {
|
|||||||
'receiver' => $this->receiver,
|
'receiver' => $this->receiver,
|
||||||
'type' => $this->type
|
'type' => $this->type
|
||||||
));
|
));
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user