1 | <?php |
||
9 | abstract class AbstractMessage implements TwitterMessage |
||
10 | { |
||
11 | /** |
||
12 | * @var TwitterMessageId |
||
13 | */ |
||
14 | protected $id; |
||
15 | |||
16 | /** |
||
17 | * @var TwitterUser |
||
18 | */ |
||
19 | protected $sender; |
||
20 | |||
21 | /** |
||
22 | * @var string |
||
23 | */ |
||
24 | protected $text; |
||
25 | |||
26 | /** |
||
27 | * @var TwitterEntities |
||
28 | */ |
||
29 | protected $entities; |
||
30 | |||
31 | /** |
||
32 | * @var \DateTimeInterface |
||
33 | */ |
||
34 | protected $date; |
||
35 | |||
36 | /** |
||
37 | * Init. |
||
38 | * |
||
39 | * @param TwitterMessageId $id |
||
40 | * @param TwitterUser $sender |
||
41 | * @param string $text |
||
42 | * @param TwitterEntities $entities |
||
43 | * @param \DateTimeInterface $date |
||
44 | */ |
||
45 | 36 | public function init( |
|
60 | |||
61 | /** |
||
62 | * @return TwitterMessageId |
||
63 | */ |
||
64 | 21 | public function getId() |
|
68 | |||
69 | /** |
||
70 | * @return string |
||
71 | */ |
||
72 | 21 | public function getText() |
|
76 | |||
77 | /** |
||
78 | * @return TwitterEntities |
||
79 | */ |
||
80 | 21 | public function getEntities() |
|
84 | |||
85 | /** |
||
86 | * @return TwitterUser |
||
87 | */ |
||
88 | 21 | public function getSender() |
|
92 | |||
93 | |||
94 | /** |
||
95 | * @return \DateTimeInterface |
||
96 | */ |
||
97 | 21 | public function getDate() |
|
101 | |||
102 | /** |
||
103 | * @return string[] |
||
104 | */ |
||
105 | 6 | public function getFormattedHashtags() |
|
115 | |||
116 | /** |
||
117 | * @return string[] |
||
118 | */ |
||
119 | 6 | public function getFormattedUserMentions() |
|
129 | |||
130 | /** |
||
131 | * @return string |
||
132 | */ |
||
133 | 6 | public function getStrippedText() |
|
139 | |||
140 | /** |
||
141 | * @param string $text |
||
142 | * @return bool |
||
143 | */ |
||
144 | 6 | public function containsHashtag($text) |
|
155 | } |
||
156 |