1 | <?php |
||
25 | class Voice extends AbstractInlineQueryResult |
||
26 | { |
||
27 | /** |
||
28 | * {@inheritdoc} |
||
29 | * |
||
30 | * @var array |
||
31 | */ |
||
32 | static protected $requiredParams = ['type', 'id', 'voice_url', 'title']; |
||
33 | |||
34 | /** |
||
35 | * {@inheritdoc} |
||
36 | * |
||
37 | * @var array |
||
38 | */ |
||
39 | static protected $map = [ |
||
40 | 'type' => true, |
||
41 | 'id' => true, |
||
42 | 'voice_url' => true, |
||
43 | 'title' => true, |
||
44 | 'voice_duration' => true, |
||
45 | 'reply_markup' => InlineKeyboardMarkup::class, |
||
46 | 'input_message_content' => InputMessageContent::class, |
||
47 | ]; |
||
48 | |||
49 | /** |
||
50 | * {@inheritdoc} |
||
51 | * |
||
52 | * @var string |
||
53 | */ |
||
54 | protected $type = 'voice'; |
||
55 | |||
56 | /** |
||
57 | * A valid URL for the audio file |
||
58 | * |
||
59 | * @var string |
||
60 | */ |
||
61 | protected $voiceUrl; |
||
62 | |||
63 | |||
64 | /** |
||
65 | * Optional. Audio duration in seconds |
||
66 | * |
||
67 | * @var int |
||
68 | */ |
||
69 | protected $voiceDuration; |
||
70 | |||
71 | /** |
||
72 | * Voice constructor |
||
73 | * |
||
74 | * @param string $id |
||
75 | * @param string $voiceUrl |
||
76 | * @param string $title |
||
77 | * @param int|null $voiceDuration |
||
78 | * @param InlineKeyboardMarkup|null $inlineKeyboardMarkup |
||
79 | * @param InputMessageContent|null $inputMessageContent |
||
80 | */ |
||
81 | public function __construct( |
||
96 | |||
97 | /** |
||
98 | * @return string |
||
99 | */ |
||
100 | public function getVoiceUrl() |
||
104 | |||
105 | /** |
||
106 | * @param string $voiceUrl |
||
107 | */ |
||
108 | public function setVoiceUrl($voiceUrl) |
||
112 | |||
113 | /** |
||
114 | * @return int |
||
115 | */ |
||
116 | public function getVoiceDuration() |
||
120 | |||
121 | /** |
||
122 | * @param int $voiceDuration |
||
123 | */ |
||
124 | public function setVoiceDuration($voiceDuration) |
||
128 | } |
||
129 |