class InlineQueryResultPhoto implements InlineQueryResultInterface

Represents a link to a photo. By default, this photo will be sent by the user with optional caption. Alternatively, you can use input_message_content to send a message with the specified content instead of the photo.

Methods

__construct(string $type, string $id, string $photo_url, string $thumb_url, int|null $photo_width = null, int|null $photo_height = null, string|null $title = null, string|null $description = null, string|null $caption = null, string|null $parse_mode = null, MessageEntity[]|null $caption_entities = null, InlineKeyboardMarkup|null $reply_markup = null, InputMessageContentInterface|null $input_message_content = null)

No description

string
getType()

Type of the result, must be photo.

string
getId()

Unique identifier for this result, 1-64 bytes.

string
getPhotoUrl()

A valid URL of the photo. Photo must be in JPEG format. Photo size must not exceed 5MB.

string
getThumbUrl()

URL of the thumbnail for the photo.

int|null
getPhotoWidth()

Optional. Width of the photo.

int|null
getPhotoHeight()

Optional. Height of the photo.

string|null
getTitle()

Optional. Title for the result.

string|null
getDescription()

Optional. Short description of the result.

string|null
getCaption()

Optional. Caption of the photo to be sent, 0-1024 characters after entities parsing.

string|null
getParseMode()

Optional. Mode for parsing entities in the photo caption. See formatting options for more details.

array|null
getCaptionEntities()

Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode.

InlineKeyboardMarkup|null
getReplyMarkup()

Optional. Inline keyboard attached to the message.

InputMessageContentInterface|null
getInputMessageContent()

Optional. Content of the message to be sent instead of the photo.

Details

at line 25
__construct(string $type, string $id, string $photo_url, string $thumb_url, int|null $photo_width = null, int|null $photo_height = null, string|null $title = null, string|null $description = null, string|null $caption = null, string|null $parse_mode = null, MessageEntity[]|null $caption_entities = null, InlineKeyboardMarkup|null $reply_markup = null, InputMessageContentInterface|null $input_message_content = null)

No description

Parameters

string $type
string $id
string $photo_url
string $thumb_url
int|null $photo_width
int|null $photo_height
string|null $title
string|null $description
string|null $caption
string|null $parse_mode
MessageEntity[]|null $caption_entities
InlineKeyboardMarkup|null $reply_markup
InputMessageContentInterface|null $input_message_content

at line 45
string getType()

Type of the result, must be photo.

Return Value

string

at line 53
string getId()

Unique identifier for this result, 1-64 bytes.

Return Value

string

at line 61
string getPhotoUrl()

A valid URL of the photo. Photo must be in JPEG format. Photo size must not exceed 5MB.

Return Value

string

at line 69
string getThumbUrl()

URL of the thumbnail for the photo.

Return Value

string

at line 77
int|null getPhotoWidth()

Optional. Width of the photo.

Return Value

int|null

at line 85
int|null getPhotoHeight()

Optional. Height of the photo.

Return Value

int|null

at line 93
string|null getTitle()

Optional. Title for the result.

Return Value

string|null

at line 101
string|null getDescription()

Optional. Short description of the result.

Return Value

string|null

at line 109
string|null getCaption()

Optional. Caption of the photo to be sent, 0-1024 characters after entities parsing.

Return Value

string|null

at line 117
string|null getParseMode()

Optional. Mode for parsing entities in the photo caption. See formatting options for more details.

Return Value

string|null

at line 127
array|null getCaptionEntities()

Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode.

Return Value

array|null

at line 135
InlineKeyboardMarkup|null getReplyMarkup()

Optional. Inline keyboard attached to the message.

Return Value

InlineKeyboardMarkup|null

at line 143
InputMessageContentInterface|null getInputMessageContent()

Optional. Content of the message to be sent instead of the photo.

Return Value

InputMessageContentInterface|null