Overview

Namespaces

  • LINE
    • LINEBot
      • Constant
      • Event
        • MessageEvent
        • Parser
      • Exception
      • HTTPClient
      • ImagemapActionBuilder
      • MessageBuilder
        • Imagemap
        • TemplateBuilder
      • TemplateActionBuilder

Classes

  • BaseEvent
  • BeaconDetectionEvent
  • FollowEvent
  • JoinEvent
  • LeaveEvent
  • MessageEvent
  • PostbackEvent
  • UnfollowEvent
  • UnknownEvent
  • Overview
  • Namespace
  • Class

Class BaseEvent

Base class of each events.

Don't instantiate this class individually.

Direct known subclasses

LINE\LINEBot\Event\BeaconDetectionEvent, LINE\LINEBot\Event\FollowEvent, LINE\LINEBot\Event\JoinEvent, LINE\LINEBot\Event\LeaveEvent, LINE\LINEBot\Event\MessageEvent, LINE\LINEBot\Event\PostbackEvent, LINE\LINEBot\Event\UnfollowEvent, LINE\LINEBot\Event\UnknownEvent

Indirect known subclasses

LINE\LINEBot\Event\MessageEvent\AudioMessage, LINE\LINEBot\Event\MessageEvent\FileMessage, LINE\LINEBot\Event\MessageEvent\ImageMessage, LINE\LINEBot\Event\MessageEvent\LocationMessage, LINE\LINEBot\Event\MessageEvent\StickerMessage, LINE\LINEBot\Event\MessageEvent\TextMessage, LINE\LINEBot\Event\MessageEvent\UnknownMessage, LINE\LINEBot\Event\MessageEvent\VideoMessage
Namespace: LINE\LINEBot\Event
Package: LINE\LINEBot\Event
Located at LINEBot/Event/BaseEvent.php
Methods summary
public
# __construct( array $event )

BaseEvent constructor.

BaseEvent constructor.

Parameters

$event
public string
# getType( )

Returns event type.

Returns event type.

Returns

string
public integer
# getTimestamp( )

Returns timestamp of the event.

Returns timestamp of the event.

Returns

integer
public string|null
# getReplyToken( )

Returns reply token of the event.

Returns reply token of the event.

Returns

string|null
public boolean
# isUserEvent( )

Returns the event is user's one or not.

Returns the event is user's one or not.

Returns

boolean
public boolean
# isGroupEvent( )

Returns the event is group's one or not.

Returns the event is group's one or not.

Returns

boolean
public boolean
# isRoomEvent( )

Returns the event is room's one or not.

Returns the event is room's one or not.

Returns

boolean
public boolean
# isUnknownEvent( )

Returns the event is unknown or not.

Returns the event is unknown or not.

Returns

boolean
public string|null
# getUserId( )

Returns user ID of the event.

Returns user ID of the event.

Returns

string|null
public string|null
# getGroupId( )

Returns group ID of the event.

Returns group ID of the event.

Returns

string|null

Throws

LINE\LINEBot\Exception\InvalidEventSourceException
Raise when called with non group type event.
public string|null
# getRoomId( )

Returns room ID of the event.

Returns room ID of the event.

Returns

string|null

Throws

LINE\LINEBot\Exception\InvalidEventSourceException
Raise when called with non room type event.
public null|string
# getEventSourceId( )

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

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

Returns

null|string
Properties summary
protected array $event
#
line-bot-sdk-php API documentation generated by ApiGen