Documentation

InputMediaAnimation extends Entity
in package
implements InputMedia

Class InputMediaAnimation

Tags
link
$data = [ 'media' => '123abc', 'thumb' => '456def', 'caption' => '*Animation* caption', 'parse_mode' => 'markdown', 'width' => 200, 'height' => 150, 'duration' => 11, ];

Interfaces, Classes and Traits

InputMedia

Table of Contents

__call()  : mixed|null
Return the variable for the called getter or magically set properties dynamically.
__construct()  : mixed
InputMediaAnimation constructor
__toString()  : string
Perform to string
escapeMarkdown()  : string
Escape markdown special characters
getBotUsername()  :
getCaption()  :
getDuration()  :
getHeight()  :
getMedia()  :
getParseMode()  :
getProperty()  : mixed
Get a property from the current Entity
getRawData()  :
getThumb()  :
getType()  :
getWidth()  :
setCaption()  :
setDuration()  :
setHeight()  :
setMedia()  :
setParseMode()  :
setThumb()  :
setWidth()  :
toJson()  : string
Perform to json
tryMention()  : string|null
Try to mention the user
assignMemberVariables()  : mixed
Helper to set member variables
makePrettyObjectArray()  : array<string|int, mixed>
Return an array of nice objects from an array of object arrays
subEntities()  : array<string|int, mixed>
Get the list of the properties that are themselves Entities
validate()  : mixed
Perform any special entity validation

Methods

__call()

Return the variable for the called getter or magically set properties dynamically.

public __call( $method,  $args) : mixed|null
Parameters
$method :
$args :
Return values
mixed|null

__construct()

InputMediaAnimation constructor

public __construct([array<string|int, mixed> $data = [] ]) : mixed
Parameters
$data : array<string|int, mixed> = []
Tags
throws
TelegramException
Return values
mixed

__toString()

Perform to string

public __toString() : string
Return values
string

escapeMarkdown()

Escape markdown special characters

public escapeMarkdown(string $string) : string
Parameters
$string : string
Return values
string

getBotUsername()

public getBotUsername() :

Return the bot name passed to this entity

Return values

getCaption()

public getCaption() :

Optional. Caption of the animation to be sent, 0-200 characters

Return values

getMedia()

public 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://<file_attach_name>” to upload a new one using multipart/form-data under <file_attach_name> name. More info on Sending Files »

Return values

getParseMode()

public getParseMode() :

Optional. Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in the media caption.

Return values

getProperty()

Get a property from the current Entity

public getProperty(mixed $property[, mixed $default = null ]) : mixed
Parameters
$property : mixed
$default : mixed = null
Return values
mixed

getRawData()

public getRawData() :

Get the raw data passed to this entity

Return values

getThumb()

public getThumb() :

Optional. Thumbnail of the file sent. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail‘s width and height should not exceed 90. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can’t be reused and can be only uploaded as a new file, so you can pass “attach://<file_attach_name>” if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More info on Sending Files »

Return values

setCaption()

public setCaption(string $caption) :

Optional. Caption of the animation to be sent, 0-200 characters

Parameters
$caption : string
Return values

setDuration()

public setDuration(int $duration) :

Optional. Animation duration

Parameters
$duration : int
Return values

setHeight()

public setHeight(int $height) :

Optional. Animation height

Parameters
$height : int
Return values

setMedia()

public setMedia(string $media) :

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://<file_attach_name>” to upload a new one using multipart/form-data under <file_attach_name> name. More info on Sending Files »

Parameters
$media : string
Return values

setParseMode()

public setParseMode(string $parse_mode) :

Optional. Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in the media caption.

Parameters
$parse_mode : string
Return values

setThumb()

public setThumb(string $thumb) :

Optional. Thumbnail of the file sent. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail‘s width and height should not exceed 90. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can’t be reused and can be only uploaded as a new file, so you can pass “attach://<file_attach_name>” if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More info on Sending Files »

Parameters
$thumb : string
Return values

setWidth()

public setWidth(int $width) :

Optional. Animation width

Parameters
$width : int
Return values

toJson()

Perform to json

public toJson() : string
Return values
string

tryMention()

Try to mention the user

public tryMention([bool $escape_markdown = false ]) : string|null

Mention the user with the username otherwise print first and last name if the $escape_markdown argument is true special characters are escaped from the output

Parameters
$escape_markdown : bool = false
Return values
string|null

assignMemberVariables()

Helper to set member variables

protected assignMemberVariables(array<string|int, mixed> $data) : mixed
Parameters
$data : array<string|int, mixed>
Return values
mixed

makePrettyObjectArray()

Return an array of nice objects from an array of object arrays

protected makePrettyObjectArray(string $class, string $property) : array<string|int, mixed>

This method is used to generate pretty object arrays mainly for PhotoSize and Entities object arrays.

Parameters
$class : string
$property : string
Return values
array<string|int, mixed>

subEntities()

Get the list of the properties that are themselves Entities

protected subEntities() : array<string|int, mixed>
Return values
array<string|int, mixed>

validate()

Perform any special entity validation

protected validate() : mixed
Tags
throws
TelegramException
Return values
mixed

Search results