Update
extends Entity
in package
Class Update
Tags
Table of Contents
- __call() : mixed|null
- Return the variable for the called getter or magically set properties dynamically.
- __construct() : mixed
- Entity constructor.
- __toString() : string
- Perform to string
- escapeMarkdown() : string
- Escape markdown special characters
- getBotUsername() :
- getCallbackQuery() :
- getChannelPost() :
- getChosenInlineResult() :
- getEditedChannelPost() :
- getEditedMessage() :
- getInlineQuery() :
- getMessage() :
- getPreCheckoutQuery() :
- getProperty() : mixed
- Get a property from the current Entity
- getRawData() :
- getShippingQuery() :
- getUpdateContent() : CallbackQuery
- Get update content
- getUpdateId() :
- getUpdateType() : string|null
- Get the update type based on the set properties
- 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
Return values
mixed|null —__construct()
Entity constructor.
public
__construct(array<string|int, mixed> $data[, string $bot_username = '' ]) : mixed
Parameters
- $data : array<string|int, mixed>
- $bot_username : string = ''
Tags
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
—getCallbackQuery()
public
getCallbackQuery() :
Optional. New incoming callback query
Return values
—getChannelPost()
public
getChannelPost() :
Optional. New post in the channel, can be any kind — text, photo, sticker, etc.
Return values
—getChosenInlineResult()
public
getChosenInlineResult() :
Optional. The result of an inline query that was chosen by a user and sent to their chat partner.
Return values
—getEditedChannelPost()
public
getEditedChannelPost() :
Optional. New version of a post in the channel that is known to the bot and was edited
Return values
—getEditedMessage()
public
getEditedMessage() :
Optional. New version of a message that is known to the bot and was edited
Return values
—getInlineQuery()
public
getInlineQuery() :
Optional. New incoming inline query
Return values
—getMessage()
public
getMessage() :
Optional. New incoming message of any kind — text, photo, sticker, etc.
Return values
—getPreCheckoutQuery()
public
getPreCheckoutQuery() :
Optional. New incoming pre-checkout query. Contains full information about checkout
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
—getShippingQuery()
public
getShippingQuery() :
Optional. New incoming shipping query. Only for invoices with flexible price
Return values
—getUpdateContent()
Get update content
public
getUpdateContent() : CallbackQuery
Return values
CallbackQuery —|\Longman\TelegramBot\Entities\ChosenInlineResult |\Longman\TelegramBot\Entities\InlineQuery |\Longman\TelegramBot\Entities\Message
getUpdateId()
public
getUpdateId() :
The update's unique identifier. Update identifiers start from a certain positive number and increase sequentially. This ID becomes especially handy if you’re using Webhooks, since it allows you to ignore repeated updates or to restore the correct update sequence, should they get out of order.
Return values
—getUpdateType()
Get the update type based on the set properties
public
getUpdateType() : string|null
Return values
string|null —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