| 1 | <?php |
||
| 11 | class VkCommunityReceivedMessage implements ReceivedMessage |
||
| 12 | { |
||
| 13 | private $payload; |
||
| 14 | |||
| 15 | 1 | public function __construct(array $payload) |
|
| 19 | |||
| 20 | /** |
||
| 21 | * Get text. |
||
| 22 | * |
||
| 23 | * @return string|null |
||
| 24 | */ |
||
| 25 | 1 | public function getText(): ?string |
|
| 29 | |||
| 30 | /** |
||
| 31 | * Get location. |
||
| 32 | * |
||
| 33 | * @return Location|null |
||
| 34 | */ |
||
| 35 | 1 | public function getLocation(): ?Location |
|
| 39 | |||
| 40 | /** |
||
| 41 | * Determine if message has attachment. |
||
| 42 | * |
||
| 43 | * @return bool |
||
| 44 | */ |
||
| 45 | 1 | public function hasAttachment(): bool |
|
| 49 | |||
| 50 | /** |
||
| 51 | * Get attachment. |
||
| 52 | * |
||
| 53 | * @return Attachment|null |
||
| 54 | */ |
||
| 55 | 1 | public function getAttachment(): ?Attachment |
|
| 59 | |||
| 60 | /** |
||
| 61 | * Determine if message has data payload. |
||
| 62 | * |
||
| 63 | * @return bool |
||
| 64 | */ |
||
| 65 | public function hasData(): bool |
||
| 69 | |||
| 70 | /** |
||
| 71 | * Get data payload. |
||
| 72 | * |
||
| 73 | * @return string|null |
||
| 74 | */ |
||
| 75 | public function getData(): ?string |
||
| 79 | } |
||
| 80 |