1 | <?php |
||
15 | class Poll extends BaseType implements TypeInterface |
||
16 | { |
||
17 | /** |
||
18 | * {@inheritdoc} |
||
19 | * |
||
20 | * @var array |
||
21 | */ |
||
22 | static protected $requiredParams = ['id', 'question', 'options', 'is_closed']; |
||
23 | |||
24 | /** |
||
25 | * {@inheritdoc} |
||
26 | * |
||
27 | * @var array |
||
28 | */ |
||
29 | static protected $map = [ |
||
30 | 'id' => true, |
||
31 | 'question' => true, |
||
32 | 'options' => ArrayOfPollOption::class, |
||
33 | 'is_closed' => true |
||
34 | ]; |
||
35 | |||
36 | /** |
||
37 | * Unique poll identifier |
||
38 | * |
||
39 | * @var string |
||
40 | */ |
||
41 | protected $id; |
||
42 | |||
43 | /** |
||
44 | * Poll question, 1-255 characters |
||
45 | * |
||
46 | * @var string |
||
47 | */ |
||
48 | protected $question; |
||
49 | |||
50 | /** |
||
51 | * List of poll options |
||
52 | * Array of \TelegramBot\Api\Types\PollOption |
||
53 | * |
||
54 | * @var array |
||
55 | */ |
||
56 | protected $options; |
||
57 | |||
58 | /** |
||
59 | * True, if the poll is closed |
||
60 | * |
||
61 | * @var boolean |
||
62 | */ |
||
63 | protected $isClosed; |
||
64 | |||
65 | /** |
||
66 | * @return string |
||
67 | */ |
||
68 | public function getId() |
||
72 | |||
73 | /** |
||
74 | * @param string $id |
||
75 | */ |
||
76 | public function setId($id) |
||
80 | |||
81 | /** |
||
82 | * @return string |
||
83 | */ |
||
84 | public function getQuestion() |
||
88 | |||
89 | /** |
||
90 | * @param string $question |
||
91 | */ |
||
92 | public function setQuestion($question) |
||
96 | |||
97 | /** |
||
98 | * @return array |
||
99 | */ |
||
100 | public function getOptions() |
||
104 | |||
105 | /** |
||
106 | * @param array $options |
||
107 | */ |
||
108 | public function setOptions($options) |
||
112 | |||
113 | /** |
||
114 | * @return bool |
||
115 | */ |
||
116 | public function isClosed() |
||
120 | |||
121 | /** |
||
122 | * @param bool $isClosed |
||
123 | */ |
||
124 | public function setIsClosed($isClosed) |
||
128 | } |
||
129 |