LINE Messaging API SDK for PHP

TextMessage extends MessageEvent

A class that represents the message event of text.

Table of Contents

$event  : array<string|int, mixed>
$message  : array<string|int, mixed>
$emojis  : array<string|int, mixed>|null
Emoji Info List
$mentionees  : array<string|int, mixed>|null
mentioned user Info List
__construct()  : mixed
TextMessage constructor.
getEmojis()  : array<string|int, mixed>
Returns emoji info list of the messages.
getEvent()  : array<string|int, mixed>
Returns event
getEventSourceId()  : null|string
Returns the identifier of the event source that associated with event source type (i.e. userId, groupId or roomId).
getGroupId()  : string|null
Returns group ID of the event.
getMentionees()  : array<string|int, mixed>|null
Returns mentioned user info list of the messages.
getMessageId()  : string
Returns the identifier of the message.
getMessageType()  : string
Returns the type of the message.
getMode()  : string
Returns mode.
getReplyToken()  : string|null
Returns reply token of the event.
getRoomId()  : string|null
Returns room ID of the event.
getText()  : string
Returns text of the message.
getTimestamp()  : int
Returns timestamp of the event.
getType()  : string
Returns event type.
getUserId()  : string|null
Returns user ID of the event.
getWebhookEventId()  : string
Returns webhook event id
isGroupEvent()  : bool
Returns the event is group's one or not.
isRedelivery()  : bool
Returns the event is a redelivered one or not.
isRoomEvent()  : bool
Returns the event is room's one or not.
isUnknownEvent()  : bool
Returns the event is unknown or not.
isUserEvent()  : bool
Returns the event is user's one or not.

Properties

$event

protected array<string|int, mixed> $event

$emojis

Emoji Info List

private array<string|int, mixed>|null $emojis

$mentionees

mentioned user Info List

private array<string|int, mixed>|null $mentionees

Methods

__construct()

TextMessage constructor.

public __construct(array<string|int, mixed> $event) : mixed
Parameters
$event : array<string|int, mixed>
Return values
mixed

getEmojis()

Returns emoji info list of the messages.

public getEmojis() : array<string|int, mixed>
Return values
array<string|int, mixed>

getEvent()

Returns event

public getEvent() : array<string|int, mixed>
Return values
array<string|int, mixed>

getEventSourceId()

Returns the identifier of the event source that associated with event source type (i.e. userId, groupId or roomId).

public getEventSourceId() : null|string
Tags
throws
InvalidEventSourceException
Return values
null|string

getGroupId()

Returns group ID of the event.

public getGroupId() : string|null
Tags
throws
InvalidEventSourceException

Raise when called with non group type event.

Return values
string|null

getMentionees()

Returns mentioned user info list of the messages.

public getMentionees() : array<string|int, mixed>|null
Return values
array<string|int, mixed>|null

getMessageId()

Returns the identifier of the message.

public getMessageId() : string
Return values
string

getMessageType()

Returns the type of the message.

public getMessageType() : string
Return values
string

getMode()

Returns mode.

public getMode() : string

active: The channel is active. standby: The channel is waiting.

Return values
string

getReplyToken()

Returns reply token of the event.

public getReplyToken() : string|null
Return values
string|null

getRoomId()

Returns room ID of the event.

public getRoomId() : string|null
Tags
throws
InvalidEventSourceException

Raise when called with non room type event.

Return values
string|null

getText()

Returns text of the message.

public getText() : string
Return values
string

getTimestamp()

Returns timestamp of the event.

public getTimestamp() : int
Return values
int

getType()

Returns event type.

public getType() : string
Return values
string

getUserId()

Returns user ID of the event.

public getUserId() : string|null
Return values
string|null

getWebhookEventId()

Returns webhook event id

public getWebhookEventId() : string
Return values
string

isGroupEvent()

Returns the event is group's one or not.

public isGroupEvent() : bool
Return values
bool

isRedelivery()

Returns the event is a redelivered one or not.

public isRedelivery() : bool
Return values
bool

isRoomEvent()

Returns the event is room's one or not.

public isRoomEvent() : bool
Return values
bool

isUnknownEvent()

Returns the event is unknown or not.

public isUnknownEvent() : bool
Return values
bool

isUserEvent()

Returns the event is user's one or not.

public isUserEvent() : bool
Return values
bool

Search results