public function dispatch(MessageInterface $message)
    {
        $builder = $this->notificationBuilder;

        $notifications = $builder->buildNotifications($message);

        /** @var Notification $notification */
        foreach ($notifications as $notification) {
            $this->sendNotification($notification);
        }

        return $this;
    }
public function dispatch(MessageInterface $message)
    {
        $builder = $this->notificationBuilder;

        $notifications = $builder->buildNotifications($message);

        /** @var Notification $notification */
        foreach ($notifications as $notification) {
            $this->sendNotification($notification);
        }

        return $this;
    }
public function dispatch ( MessageInterface $ message ) { $ builder = $ this -> notificationBuilder ; $ notifications = $ builder -> buildNotifications ( $ message ) ; /** @var Notification $notification */ foreach ( $ notifications as $ notification ) { $ this -> sendNotification ( $ notification ) ; } return $ this ; }
Build notification and send it to notification service

@param MessageInterface $message
@return $this
Build notification and send it to notification service