Commit | Line | Data |
---|---|---|
d45eaff6 | 1 | <?php |
a9229942 | 2 | |
d45eaff6 MW |
3 | namespace wcf\data; |
4 | ||
5 | /** | |
6 | * Default interface for message database objects. | |
a9229942 TD |
7 | * |
8 | * @author Alexander Ebert | |
9 | * @copyright 2001-2019 WoltLab GmbH | |
10 | * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php> | |
11 | * @package WoltLabSuite\Core\Data | |
d45eaff6 | 12 | */ |
a9229942 TD |
13 | interface IMessage extends IUserContent |
14 | { | |
15 | /** | |
16 | * Returns a simplified message (only inline codes), truncated to 255 characters by default. | |
17 | * | |
18 | * @param int $maxLength | |
19 | * @return string | |
20 | */ | |
21 | public function getExcerpt($maxLength = 255); | |
22 | ||
23 | /** | |
24 | * Returns formatted message text. | |
25 | * | |
26 | * @return string | |
27 | */ | |
28 | public function getFormattedMessage(); | |
29 | ||
30 | /** | |
31 | * Returns message text. | |
32 | * | |
33 | * @return string | |
34 | */ | |
35 | public function getMessage(); | |
36 | ||
37 | /** | |
38 | * Returns true, if message is visible for current user. | |
39 | * | |
40 | * @return bool | |
41 | */ | |
42 | public function isVisible(); | |
43 | ||
44 | /** | |
45 | * Returns formatted message text. | |
46 | * | |
47 | * @see \wcf\data\IMessage::getFormattedMessage() | |
48 | */ | |
49 | public function __toString(); | |
d45eaff6 | 50 | } |