1 | <?php |
||
25 | class Audio extends AbstractInlineQueryResult |
||
26 | { |
||
27 | /** |
||
28 | * {@inheritdoc} |
||
29 | * |
||
30 | * @var array |
||
31 | */ |
||
32 | static protected $requiredParams = ['type', 'id', 'audio_url', 'title']; |
||
33 | |||
34 | /** |
||
35 | * {@inheritdoc} |
||
36 | * |
||
37 | * @var array |
||
38 | */ |
||
39 | static protected $map = [ |
||
40 | 'type' => true, |
||
41 | 'id' => true, |
||
42 | 'audio_url' => true, |
||
43 | 'title' => true, |
||
44 | 'performer' => true, |
||
45 | 'audio_duration' => true, |
||
46 | 'reply_markup' => InlineKeyboardMarkup::class, |
||
47 | 'input_message_content' => InputMessageContent::class, |
||
48 | ]; |
||
49 | |||
50 | /** |
||
51 | * {@inheritdoc} |
||
52 | * |
||
53 | * @var string |
||
54 | */ |
||
55 | protected $type = 'audio'; |
||
56 | |||
57 | /** |
||
58 | * A valid URL for the audio file |
||
59 | * |
||
60 | * @var string |
||
61 | */ |
||
62 | protected $audioUrl; |
||
63 | |||
64 | /** |
||
65 | * Optional. Performer |
||
66 | * |
||
67 | * @var string |
||
68 | */ |
||
69 | protected $performer; |
||
70 | |||
71 | /** |
||
72 | * Optional. Audio duration in seconds |
||
73 | * |
||
74 | * @var int |
||
75 | */ |
||
76 | protected $audioDuration; |
||
77 | |||
78 | /** |
||
79 | * Audio constructor. |
||
80 | * |
||
81 | * @param string $id |
||
82 | * @param string $audioUrl |
||
83 | * @param string $title |
||
84 | * @param string|null $performer |
||
85 | * @param int|null $audioDuration |
||
86 | * @param InlineKeyboardMarkup|null $inlineKeyboardMarkup |
||
87 | * @param InputMessageContent|null $inputMessageContent |
||
88 | */ |
||
89 | public function __construct( |
||
106 | |||
107 | /** |
||
108 | * @return string |
||
109 | */ |
||
110 | public function getAudioUrl() |
||
114 | |||
115 | /** |
||
116 | * @param string $audioUrl |
||
117 | */ |
||
118 | public function setAudioUrl($audioUrl) |
||
122 | |||
123 | /** |
||
124 | * @return string |
||
125 | */ |
||
126 | public function getPerformer() |
||
130 | |||
131 | /** |
||
132 | * @param string $performer |
||
133 | */ |
||
134 | public function setPerformer($performer) |
||
138 | |||
139 | /** |
||
140 | * @return int |
||
141 | */ |
||
142 | public function getAudioDuration() |
||
146 | |||
147 | /** |
||
148 | * @param int $audioDuration |
||
149 | */ |
||
150 | public function setAudioDuration($audioDuration) |
||
154 | } |
||
155 |