src/Provider/IronMqProvider.php
public function onNotification(NotificationEvent $event, $eventName, EventDispatcherInterface $dispatcher)
    {
        $message = new Message(
            $event->getNotification()->getId(),
            $event->getNotification()->getBody(),
            $event->getNotification()->getMetadata()->toArray()
        );

        $this->log(
            200,
            "Message has been received from Push Notification.",
            ['message_id' => $event->getNotification()->getId()]
        );

        $messageEvent = new MessageEvent($this->name, $message);

        $dispatcher->dispatch(
            Events::Message($this->name),
            $messageEvent
        );
    }
public function onNotification(NotificationEvent $event, $eventName, EventDispatcherInterface $dispatcher)
    {
        $message = new Message(
            $event->getNotification()->getId(),
            $event->getNotification()->getBody(),
            $event->getNotification()->getMetadata()->toArray()
        );

        $this->log(
            200,
            "Message has been received from Push Notification.",
            ['message_id' => $event->getNotification()->getId()]
        );

        $messageEvent = new MessageEvent($this->name, $message);

        $dispatcher->dispatch(
            Events::Message($this->name),
            $messageEvent
        );
    }
public function onNotification ( NotificationEvent $ event , $ eventName , EventDispatcherInterface $ dispatcher ) { $ message = new Message ( $ event -> getNotification ( ) -> getId ( ) , $ event -> getNotification ( ) -> getBody ( ) , $ event -> getNotification ( ) -> getMetadata ( ) -> toArray ( ) ) ; $ this -> log ( 200 , "Message has been received from Push Notification." , [ 'message_id' => $ event -> getNotification ( ) -> getId ( ) ] ) ; $ messageEvent = new MessageEvent ( $ this -> name , $ message ) ; $ dispatcher -> dispatch ( Events :: Message ( $ this -> name ) , $ messageEvent ) ; }
Polls the Queue on Notification from IronMQ

Dispatches the `{queue}.message_received` event

@param NotificationEvent $event The Notification Event
@param string $eventName Name of the event
@param EventDispatcherInterface $dispatcher
@return void
Polls the Queue on Notification from IronMQ