class Message extends BaseObject (View source)

Class Message

Methods

__construct( array|mixed $data)

Builds collection entity.

from  BaseObject
array
relations()

No description

mixed|BaseObject
get( mixed $key, mixed $default = null)

Get an item from the collection by key.

from  BaseObject
array|void
mapRelatives()

Map property relatives to appropriate objects.

from  BaseObject
array|mixed
getRawResponse()

Returns raw response.

from  BaseObject
mixed
getRawResult($data)

Returns raw result.

from  BaseObject
mixed
getStatus()

Get Status of request.

from  BaseObject
mixed
__call($name, $arguments)

Magic method to get properties dynamically.

from  BaseObject
int
getMessageId()

Unique message identifier.

User
getFrom()

Sender.

int
getDate()

Date the message was sent in Unix time.

User|GroupChat
getChat()

Conversation the message belongs to, private or group.

User
getForwardFrom()

(Optional). For forwarded messages, sender of the original message.

int
getForwardDate()

(Optional). For forwarded messages, date the original message was sent in Unix time.

Message
getReplyToMessage()

(Optional). For replies, the original message. Note that the Message object in this field will not contain further replytomessage fields even if it itself is a reply.

string
getText()

(Optional). For text messages, the actual UTF-8 text of the message.

Audio
getAudio()

(Optional). Message is an audio file, information about the file.

Document
getDocument()

(Optional). Message is a general file, information about the file.

Sticker
getSticker()

(Optional). Message is a sticker, information about the sticker.

Video
getVideo()

(Optional). Message is a video, information about the video.

Voice
getVoice()

(Optional). Message is a voice message, information about the file.

string
getCaption()

(Optional). Caption for the photo or video contact

Contact
getContact()

(Optional). Message is a shared contact, information about the contact.

Location
getLocation()

(Optional). Message is a shared location, information about the location.

User
getNewChatParticipant()

(Optional). A new member was added to the group, information about them (this member may be bot itself).

User
getLeftChatParticipant()

(Optional). A member was removed from the group, information about them (this member may be bot itself).

string
getNewChatTitle()

(Optional). A group title was changed to this value.

bool
getDeleteChatPhoto()

(Optional). Informs that the group photo was deleted.

bool
getGroupChatCreated()

(Optional). Informs that the group has been created.

Details

in BaseObject at line 19
__construct( array|mixed $data)

Builds collection entity.

Parameters

array|mixed $data

at line 39
array relations()

Return Value

array

in BaseObject at line 41
mixed|BaseObject get( mixed $key, mixed $default = null)

Get an item from the collection by key.

Parameters

mixed $key
mixed $default

Return Value

mixed|BaseObject

in BaseObject at line 55
array|void mapRelatives()

Map property relatives to appropriate objects.

Return Value

array|void

in BaseObject at line 80
array|mixed getRawResponse()

Returns raw response.

Return Value

array|mixed

in BaseObject at line 92
mixed getRawResult($data)

Returns raw result.

Parameters

$data

Return Value

mixed

in BaseObject at line 102
mixed getStatus()

Get Status of request.

Return Value

mixed

in BaseObject at line 116
mixed __call($name, $arguments)

Magic method to get properties dynamically.

Parameters

$name
$arguments

Return Value

mixed

at line 34
int getMessageId()

Unique message identifier.

Return Value

int

at line 34
User getFrom()

Sender.

Return Value

User

at line 34
int getDate()

Date the message was sent in Unix time.

Return Value

int

at line 34
User|GroupChat getChat()

Conversation the message belongs to, private or group.

Return Value

User|GroupChat

at line 34
User getForwardFrom()

(Optional). For forwarded messages, sender of the original message.

Return Value

User

at line 34
int getForwardDate()

(Optional). For forwarded messages, date the original message was sent in Unix time.

Return Value

int

at line 34
Message getReplyToMessage()

(Optional). For replies, the original message. Note that the Message object in this field will not contain further replytomessage fields even if it itself is a reply.

Return Value

Message

at line 34
string getText()

(Optional). For text messages, the actual UTF-8 text of the message.

Return Value

string

at line 34
Audio getAudio()

(Optional). Message is an audio file, information about the file.

Return Value

Audio

at line 34
Document getDocument()

(Optional). Message is a general file, information about the file.

Return Value

Document

at line 34
Sticker getSticker()

(Optional). Message is a sticker, information about the sticker.

Return Value

Sticker

at line 34
Video getVideo()

(Optional). Message is a video, information about the video.

Return Value

Video

at line 34
Voice getVoice()

(Optional). Message is a voice message, information about the file.

Return Value

Voice

at line 34
string getCaption()

(Optional). Caption for the photo or video contact

Return Value

string

at line 34
Contact getContact()

(Optional). Message is a shared contact, information about the contact.

Return Value

Contact

at line 34
Location getLocation()

(Optional). Message is a shared location, information about the location.

Return Value

Location

at line 34
User getNewChatParticipant()

(Optional). A new member was added to the group, information about them (this member may be bot itself).

Return Value

User

at line 34
User getLeftChatParticipant()

(Optional). A member was removed from the group, information about them (this member may be bot itself).

Return Value

User

at line 34
string getNewChatTitle()

(Optional). A group title was changed to this value.

Return Value

string

at line 34
bool getDeleteChatPhoto()

(Optional). Informs that the group photo was deleted.

Return Value

bool

at line 34
bool getGroupChatCreated()

(Optional). Informs that the group has been created.

Return Value

bool