PHP 클래스 Longman\TelegramBot\Entities\Message

상속: extends Entity
파일 보기 프로젝트 열기: akalongman/php-telegram-bot 1 사용 예제들

공개 메소드들

메소드 설명
__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 ( )