zend-blog-3-backend

Форк
0
162 строки · 2.3 Кб
1
<?php
2
/**
3
 * Created by PhpStorm.
4
 * User: morontt
5
 * Date: 08.10.17
6
 * Time: 18:58
7
 */
8

9
namespace Xelbot\Telegram\Entity;
10

11
class Message
12
{
13
    /**
14
     * @var int
15
     */
16
    protected $messageId;
17

18
    /**
19
     * @var User|null
20
     */
21
    protected $from;
22

23
    /**
24
     * @var Chat|null
25
     */
26
    protected $chat;
27

28
    /**
29
     * @var int
30
     */
31
    protected $date;
32

33
    /**
34
     * @var string|null
35
     */
36
    protected $text;
37

38
    /**
39
     * @var array
40
     */
41
    protected $entities = [];
42

43
    /**
44
     * @return int
45
     */
46
    public function getMessageId(): int
47
    {
48
        return $this->messageId;
49
    }
50

51
    /**
52
     * @param int $messageId
53
     *
54
     * @return Message
55
     */
56
    public function setMessageId(int $messageId): self
57
    {
58
        $this->messageId = $messageId;
59

60
        return $this;
61
    }
62

63
    /**
64
     * @return User|null
65
     */
66
    public function getFrom(): ?User
67
    {
68
        return $this->from;
69
    }
70

71
    /**
72
     * @param User|null $from
73
     *
74
     * @return Message
75
     */
76
    public function setFrom(User $from = null): self
77
    {
78
        $this->from = $from;
79

80
        return $this;
81
    }
82

83
    /**
84
     * @return Chat|null
85
     */
86
    public function getChat(): ?Chat
87
    {
88
        return $this->chat;
89
    }
90

91
    /**
92
     * @param Chat|null $chat
93
     *
94
     * @return Message
95
     */
96
    public function setChat(Chat $chat = null): self
97
    {
98
        $this->chat = $chat;
99

100
        return $this;
101
    }
102

103
    /**
104
     * @return int
105
     */
106
    public function getDate(): int
107
    {
108
        return $this->date;
109
    }
110

111
    /**
112
     * @param int $date
113
     *
114
     * @return Message
115
     */
116
    public function setDate(int $date): self
117
    {
118
        $this->date = $date;
119

120
        return $this;
121
    }
122

123
    /**
124
     * @return string|null
125
     */
126
    public function getText(): ?string
127
    {
128
        return $this->text;
129
    }
130

131
    /**
132
     * @param string|null $text
133
     *
134
     * @return Message
135
     */
136
    public function setText(string $text = null): self
137
    {
138
        $this->text = $text;
139

140
        return $this;
141
    }
142

143
    /**
144
     * @return array
145
     */
146
    public function getEntities(): array
147
    {
148
        return $this->entities;
149
    }
150

151
    /**
152
     * @param array $entities
153
     *
154
     * @return Message
155
     */
156
    public function setEntities(array $entities): self
157
    {
158
        $this->entities = $entities;
159

160
        return $this;
161
    }
162
}
163

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.