Merge branch '6.0'
[GitHub/WoltLab/WCF.git] / wcfsetup / install / files / lib / data / IMessage.class.php
CommitLineData
d45eaff6 1<?php
a9229942 2
d45eaff6
MW
3namespace 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>
d45eaff6 11 */
a9229942
TD
12interface IMessage extends IUserContent
13{
14 /**
15 * Returns a simplified message (only inline codes), truncated to 255 characters by default.
16 *
17 * @param int $maxLength
18 * @return string
19 */
20 public function getExcerpt($maxLength = 255);
21
22 /**
23 * Returns formatted message text.
24 *
25 * @return string
26 */
27 public function getFormattedMessage();
28
29 /**
30 * Returns message text.
31 *
32 * @return string
33 */
34 public function getMessage();
35
36 /**
37 * Returns true, if message is visible for current user.
38 *
39 * @return bool
40 */
41 public function isVisible();
42
43 /**
44 * Returns formatted message text.
45 *
46 * @see \wcf\data\IMessage::getFormattedMessage()
47 */
48 public function __toString();
d45eaff6 49}