1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
namespace TelegramBot\Entities\InlineQuery; |
4
|
|
|
|
5
|
|
|
use TelegramBot\Entities\InlineKeyboard; |
6
|
|
|
use TelegramBot\Entities\InputMessageContent\InputMessageContent; |
7
|
|
|
use TelegramBot\Entities\MessageEntity; |
8
|
|
|
|
9
|
|
|
/** |
10
|
|
|
* Class InlineQueryResultCachedPhoto |
11
|
|
|
* |
12
|
|
|
* @link https://core.telegram.org/bots/api#inlinequeryresultcachedphoto |
13
|
|
|
* |
14
|
|
|
* <code> |
15
|
|
|
* $data = [ |
16
|
|
|
* 'id' => '', |
17
|
|
|
* 'photo_file_id' => '', |
18
|
|
|
* 'title' => '', |
19
|
|
|
* 'description' => '', |
20
|
|
|
* 'caption' => '', |
21
|
|
|
* 'reply_markup' => <InlineKeyboard>, |
22
|
|
|
* 'input_message_content' => <InputMessageContent>, |
23
|
|
|
* ]; |
24
|
|
|
* </code> |
25
|
|
|
* |
26
|
|
|
* @method string getType() Type of the result, must be photo |
27
|
|
|
* @method string getId() Unique identifier for this result, 1-64 bytes |
28
|
|
|
* @method string getPhotoFileId() A valid file identifier of the photo |
29
|
|
|
* @method string getTitle() Optional. Title for the result |
30
|
|
|
* @method string getDescription() Optional. Short description of the result |
31
|
|
|
* @method string getCaption() Optional. Caption of the photo to be sent, 0-200 characters |
32
|
|
|
* @method string getParseMode() Optional. Mode for parsing entities in the photo caption |
33
|
|
|
* @method MessageEntity[] getCaptionEntities() Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode |
34
|
|
|
* @method InlineKeyboard getReplyMarkup() Optional. Inline keyboard attached to the message |
35
|
|
|
* @method InputMessageContent getInputMessageContent() Optional. Content of the message to be sent instead of the photo |
36
|
|
|
* |
37
|
|
|
* @method $this setId(string $id) Unique identifier for this result, 1-64 bytes |
38
|
|
|
* @method $this setPhotoFileId(string $photo_file_id) A valid file identifier of the photo |
39
|
|
|
* @method $this setTitle(string $title) Optional. Title for the result |
40
|
|
|
* @method $this setDescription(string $description) Optional. Short description of the result |
41
|
|
|
* @method $this setCaption(string $caption) Optional. Caption of the photo to be sent, 0-200 characters |
42
|
|
|
* @method $this setParseMode(string $parse_mode) Optional. Mode for parsing entities in the photo caption |
43
|
|
|
* @method $this setCaptionEntities(array $caption_entities) Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode |
44
|
|
|
* @method $this setReplyMarkup(InlineKeyboard $reply_markup) Optional. Inline keyboard attached to the message |
45
|
|
|
* @method $this setInputMessageContent(InputMessageContent $input_message_content) Optional. Content of the message to be sent instead of the photo |
46
|
|
|
*/ |
47
|
|
|
class InlineQueryResultCachedPhoto extends InlineEntity implements InlineQueryResult |
48
|
|
|
{ |
49
|
|
|
|
50
|
|
|
/** |
51
|
|
|
* InlineQueryResultCachedPhoto constructor |
52
|
|
|
* |
53
|
|
|
* @param array $data |
54
|
|
|
*/ |
55
|
|
|
public function __construct(array $data = []) |
56
|
|
|
{ |
57
|
|
|
$data['type'] = 'photo'; |
58
|
|
|
parent::__construct($data); |
59
|
|
|
} |
60
|
|
|
|
61
|
|
|
} |
62
|
|
|
|