PHP Класс Longman\TelegramBot\Entities\Message

Наследование: extends Entity
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
__construct ( array $data, string $bot_name = '' ) Message constructor
botAddedInChat ( ) : boolean Bot added in chat
getCommand ( ) : boolean | string Get command
getEntities ( ) : null | MessageEntity[] Optional. For text messages, special entities like usernames, URLs, bot commands, etc. that appear in the text
getFullCommand ( ) : string | null return the entire command like /echo or /echo@bot1 if specified
getNewChatPhoto ( ) : null | Longman\TelegramBot\Entities\PhotoSize[] Optional. A chat photo was changed to this value
getPhoto ( ) : null | Longman\TelegramBot\Entities\PhotoSize[] Optional. Message is a photo, available sizes of the photo
getText ( boolean $without_cmd = false ) : string For text messages, the actual UTF-8 text of the message, 0-4096 characters.
getType ( ) : string | null Detect type based on properties.

Защищенные методы

Метод Описание
subEntities ( )

Описание методов

__construct() публичный метод

Message constructor
public __construct ( array $data, string $bot_name = '' )
$data array
$bot_name string

botAddedInChat() публичный метод

Bot added in chat
public botAddedInChat ( ) : boolean
Результат boolean

getCommand() публичный метод

Get command
public getCommand ( ) : boolean | string
Результат boolean | string

getEntities() публичный метод

This method overrides the default getEntities method and returns a nice array of MessageEntity objects.
public getEntities ( ) : null | MessageEntity[]
Результат null | MessageEntity[]

getFullCommand() публичный метод

return the entire command like /echo or /echo@bot1 if specified
public getFullCommand ( ) : string | null
Результат string | null

getNewChatPhoto() публичный метод

This method overrides the default getNewChatPhoto method and returns a nice array of PhotoSize objects.
public getNewChatPhoto ( ) : null | Longman\TelegramBot\Entities\PhotoSize[]
Результат null | Longman\TelegramBot\Entities\PhotoSize[]

getPhoto() публичный метод

This method overrides the default getPhoto method and returns a nice array of PhotoSize objects.
public getPhoto ( ) : null | Longman\TelegramBot\Entities\PhotoSize[]
Результат null | Longman\TelegramBot\Entities\PhotoSize[]

getText() публичный метод

For text messages, the actual UTF-8 text of the message, 0-4096 characters.
public getText ( boolean $without_cmd = false ) : string
$without_cmd boolean
Результат string

getType() публичный метод

Detect type based on properties.
public getType ( ) : string | null
Результат string | null

subEntities() защищенный метод

protected subEntities ( )