1 | <?php |
||
42 | class Message extends Model implements FormatterInterface |
||
43 | { |
||
44 | /** |
||
45 | * @var RoomInterface |
||
46 | */ |
||
47 | protected $room; |
||
48 | |||
49 | /** |
||
50 | * Message constructor. |
||
51 | * |
||
52 | * @param array $attributes |
||
53 | * @param RoomInterface $room |
||
54 | */ |
||
55 | public function __construct(array $attributes, RoomInterface $room) |
||
61 | |||
62 | /** |
||
63 | * @param $value |
||
64 | * @return Carbon |
||
65 | */ |
||
66 | public function getUpdatedAtAttribute($value) |
||
74 | |||
75 | /** |
||
76 | * @param callable $cb |
||
77 | * @return bool |
||
78 | */ |
||
79 | public function hasMention(callable $cb) |
||
88 | |||
89 | /** |
||
90 | * @return mixed|string |
||
91 | */ |
||
92 | public function getEscapedTextAttribute() |
||
101 | |||
102 | /** |
||
103 | * @return mixed|string |
||
104 | */ |
||
105 | public function getTextWithoutSpecialCharsAttribute() |
||
114 | |||
115 | /** |
||
116 | * @param $text |
||
117 | * @return $this |
||
118 | */ |
||
119 | public function answer($text) |
||
125 | |||
126 | /** |
||
127 | * @param $text |
||
128 | * @return Model |
||
129 | */ |
||
130 | public function pre($text) |
||
134 | |||
135 | /** |
||
136 | * @param $code |
||
137 | * @param string $lang |
||
138 | * @return Model |
||
139 | */ |
||
140 | public function code($code, $lang = '') |
||
148 | |||
149 | /** |
||
150 | * @param $text |
||
151 | * @return Model |
||
152 | */ |
||
153 | public function italic($text) |
||
157 | |||
158 | /** |
||
159 | * @param $text |
||
160 | * @return Model |
||
161 | */ |
||
162 | public function bold($text) |
||
166 | |||
167 | /** |
||
168 | * @return RoomInterface |
||
169 | */ |
||
170 | public function getRoom() |
||
174 | } |
||
175 |