PHP Class TelegramBot\Api\Types\Inline\QueryResult\Photo

Alternatively, you can provide message_text to send it instead of photo.
Inheritance: extends AbstractInlineQueryResult
Show file Open project: TelegramBot/Api

Protected Properties

Property Type Description
$caption string Optional. Caption of the photo to be sent, 0-200 characters
$description string Optional. Short description of the result
$map array
$photoHeight integer Optional. Height of the photo
$photoUrl string A valid URL of the photo. Photo size must not exceed 5MB
$photoWidth integer Optional. Width of the photo
$requiredParams array
$thumbUrl URL of the thumbnail for the photo
$type string

Public Methods

Method Description
__construct ( string $id, string $photoUrl, string $thumbUrl, integer | null $photoWidth = null, integer | null $photoHeight = null, string | null $title = null, string | null $description = null, string | null $caption = null, TelegramBot\Api\Types\Inline\InputMessageContent | null $inputMessageContent = null, TelegramBot\Api\Types\Inline\InlineKeyboardMarkup | null $inlineKeyboardMarkup = null ) InlineQueryResultPhoto constructor.
getCaption ( ) : string
getDescription ( ) : string
getPhotoHeight ( ) : integer
getPhotoUrl ( ) : string
getPhotoWidth ( ) : integer
getThumbUrl ( ) : mixed
setCaption ( string $caption )
setDescription ( string $description )
setPhotoHeight ( integer $photoHeight )
setPhotoUrl ( string $photoUrl )
setPhotoWidth ( integer $photoWidth )
setThumbUrl ( mixed $thumbUrl )

Method Details

__construct() public method

InlineQueryResultPhoto constructor.
public __construct ( string $id, string $photoUrl, string $thumbUrl, integer | null $photoWidth = null, integer | null $photoHeight = null, string | null $title = null, string | null $description = null, string | null $caption = null, TelegramBot\Api\Types\Inline\InputMessageContent | null $inputMessageContent = null, TelegramBot\Api\Types\Inline\InlineKeyboardMarkup | null $inlineKeyboardMarkup = null )
$id string
$photoUrl string
$thumbUrl string
$photoWidth integer | null
$photoHeight integer | null
$title string | null
$description string | null
$caption string | null
$inputMessageContent TelegramBot\Api\Types\Inline\InputMessageContent | null
$inlineKeyboardMarkup TelegramBot\Api\Types\Inline\InlineKeyboardMarkup | null

getCaption() public method

public getCaption ( ) : string
return string

getDescription() public method

public getDescription ( ) : string
return string

getPhotoHeight() public method

public getPhotoHeight ( ) : integer
return integer

getPhotoUrl() public method

public getPhotoUrl ( ) : string
return string

getPhotoWidth() public method

public getPhotoWidth ( ) : integer
return integer

getThumbUrl() public method

public getThumbUrl ( ) : mixed
return mixed

setCaption() public method

public setCaption ( string $caption )
$caption string

setDescription() public method

public setDescription ( string $description )
$description string

setPhotoHeight() public method

public setPhotoHeight ( integer $photoHeight )
$photoHeight integer

setPhotoUrl() public method

public setPhotoUrl ( string $photoUrl )
$photoUrl string

setPhotoWidth() public method

public setPhotoWidth ( integer $photoWidth )
$photoWidth integer

setThumbUrl() public method

public setThumbUrl ( mixed $thumbUrl )
$thumbUrl mixed

Property Details

$caption protected property

Optional. Caption of the photo to be sent, 0-200 characters
protected string $caption
return string

$description protected property

Optional. Short description of the result
protected string $description
return string

$map protected static property

protected static array $map
return array

$photoHeight protected property

Optional. Height of the photo
protected int $photoHeight
return integer

$photoUrl protected property

A valid URL of the photo. Photo size must not exceed 5MB
protected string $photoUrl
return string

$photoWidth protected property

Optional. Width of the photo
protected int $photoWidth
return integer

$requiredParams protected static property

protected static array $requiredParams
return array

$thumbUrl protected property

URL of the thumbnail for the photo
protected $thumbUrl

$type protected property

protected string $type
return string