LINE Messaging API SDK for PHP

EventRequestParser
in package

Tags
SuppressWarnings

("PHPMD.CouplingBetweenObjects")

Table of Contents

parseEventRequest()  : ParsedEvents
Validate signature and parse Webhook event request.

Methods

parseEventRequest()

Validate signature and parse Webhook event request.

public static parseEventRequest(string $body, string $channelSecret, string $signature) : ParsedEvents

When discriminator is not unknown, Webhook event will be parsed to the corresponding superclass. For example, "type":"unknown" will be parsed to LINE\Webhook\Model\Event and "type":"message", "message.type":"unknown" will be parsed to LINE\Webhook\Model\MessageContent.

Parameters
$body : string
$channelSecret : string
$signature : string
Tags
throws
InvalidEventRequestException
throws
InvalidSignatureException
Return values
ParsedEvents

Search results