src/WebhookRequestHandler.php
public function dispatchCallbackEvents()
    {
        foreach ($this->getAllCallbackEvents() as $event) {
            $this->dispatcher->dispatch($event->getName(), $event);

            if ($event instanceof PostbackEvent) {
                // Dispatch postback payload
                $this->dispatcher->dispatch($event->getPostback()->getPayload(), $event);
            }

            if ($event instanceof MessageEvent && $event->isQuickReply()) {
                // Dispatch quick reply payload
                $this->dispatcher->dispatch($event->getQuickReplyPayload(), $event);
            }
        }
    }
public function dispatchCallbackEvents()
    {
        foreach ($this->getAllCallbackEvents() as $event) {
            $this->dispatcher->dispatch($event->getName(), $event);

            if ($event instanceof PostbackEvent) {
                // Dispatch postback payload
                $this->dispatcher->dispatch($event->getPostback()->getPayload(), $event);
            }

            if ($event instanceof MessageEvent && $event->isQuickReply()) {
                // Dispatch quick reply payload
                $this->dispatcher->dispatch($event->getQuickReplyPayload(), $event);
            }
        }
    }
public function dispatchCallbackEvents ( ) { foreach ( $ this -> getAllCallbackEvents ( ) as $ event ) { $ this -> dispatcher -> dispatch ( $ event -> getName ( ) , $ event ) ; if ( $ event instanceof PostbackEvent ) { // Dispatch postback payload $ this -> dispatcher -> dispatch ( $ event -> getPostback ( ) -> getPayload ( ) , $ event ) ; } if ( $ event instanceof MessageEvent && $ event -> isQuickReply ( ) ) { // Dispatch quick reply payload $ this -> dispatcher -> dispatch ( $ event -> getQuickReplyPayload ( ) , $ event ) ; } } }
Dispatch events to listeners
Dispatch events to listeners