class InputMediaPhoto implements InputMediaInterface

Represents a photo to be sent.

Methods

__construct(string $type, string $media, string|null $caption = null, string|null $parse_mode = null, MessageEntity[]|null $caption_entities = null)

No description

string
getType()

Type of the result, must be photo.

string
getMedia()

File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass “attach://” to upload a new one using multipart/form-data under name. More information on Sending Files ».

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.

Details

at line 17
__construct(string $type, string $media, string|null $caption = null, string|null $parse_mode = null, MessageEntity[]|null $caption_entities = null)

No description

Parameters

string $type
string $media
string|null $caption
string|null $parse_mode
MessageEntity[]|null $caption_entities

at line 29
string getType()

Type of the result, must be photo.

Return Value

string

at line 37
string getMedia()

File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass “attach://” to upload a new one using multipart/form-data under name. More information on Sending Files ».

Return Value

string

at line 45
string|null getCaption()

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

Return Value

string|null

at line 53
string|null getParseMode()

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

Return Value

string|null

at line 63
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