1
0
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:
Tim Düsterhus 2011-12-10 15:24:36 +01:00
parent ac3dfbde0e
commit 4cf51f74be

8
file/lib/data/chat/message/ChatMessage.class.php Normal file → Executable file
View 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
)); ));
} }
} }