Add a {@see NotificationInterface} that will be registered in {@see Notifire}.

@param string $notificationName
@param string $notificationClass

@return $this
488655
public function addNotification(string $notificationName, string $notificationClass): self
    {
        $this->notifications[$notificationName] = $notificationClass;

        return $this;
    }
320603
public function setMessage(NotificationInterface $notification, $message, $flush = false)
    {
        $notification->setMessage($message);
        $this->flush($flush);

        $event = new NotificationEvent($notification);
        $this->dispatcher->dispatch(MgiletNotificationEvents::MODIFIED, $event);

        return $notification;
    }
1304451
public function send($notifiable, Notification $notification)
    {
        $client = new SmsClient($this->endPoint, $this->token);
        $payload = $notification->toMMSms($notifiable);
        
        $client->send($payload);
    }
1370157
public function dispatch(MessageInterface $message)
    {
        $builder = $this->notificationBuilder;

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

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

        return $this;
    }
477565
public function add(NotificationInterface $item)
    {
        $this->collection[$this->count] = $item;

        $this->count++;

        return $this;
    }
625726
public static function create( $className = null )
    {
        if ( is_null( $className ) )
        {
            $ini = eZINI::instance( 'ezcomments.ini' );
            $className = $ini->variable( 'NotificationSettings', 'NotificationManagerClass' );
        }
        return  new $className();
    }
1134840
protected function messageBuilder($notifiable, $notification, $message)
    {
        return function ($mailMessage) use ($notifiable, $notification, $message) {
            $this->buildMessage($mailMessage, $notifiable, $notification, $message);
        };
    }
102973
public void add(T notification) {
        notificationArray.remove(notification.getId());
        notificationArray.put(notification.getId(), notification);
    }
925102
public static function instance( $className = null )
    {
        if ( is_null( $className ) )
        {
            $ini = eZINI::instance( 'ezcomments.ini' );
            $className = $ini->variable( 'NotificationSettings', 'NotificationManagerClass' );
        }
        if ( !isset( self::$instance ) )
        {
            self::$instance = new $className();
        }
        return self::$instance;
    }
54929
protected function buildMessage($notifiable, Notification $notification)
    {
        $message = call_user_func_array([$notification, $this->getToMethod()], [$notifiable]);

        if (is_string($message)) {
            $message = new PushMessage($message);
        }

        return $message;
    }
1216522
public function augment(SubscriptionNotification $notification)
	{
		$this->in  = $notification->in;
		$this->out = $notification->out;
	}
1131943
public function send($notifiable, Notification $notification)
    {
        $message = $this->getData($notifiable, $notification);

        $event = new BroadcastNotificationCreated(
            $notifiable, $notification, is_array($message) ? $message : $message->data
        );

        if ($message instanceof BroadcastMessage) {
            $event->onConnection($message->connection)
                  ->onQueue($message->queue);
        }

        return $this->events->dispatch($event);
    }
987185
public function send($notifiable, Notification $notification)
    {
        if (! $pushoverReceiver = $notifiable->routeNotificationFor('pushover')) {
            return;
        }

        if (is_string($pushoverReceiver)) {
            $pushoverReceiver = PushoverReceiver::withUserKey($pushoverReceiver);
        }

        $message = $notification->toPushover($notifiable);

        try {
            $this->pushover->send(array_merge($message->toArray(), $pushoverReceiver->toArray()));
        } catch (ServiceCommunicationError $serviceCommunicationError) {
            $this->fireFailedEvent($notifiable, $notification, $serviceCommunicationError->getMessage());
        }
    }
1292562
public function send($notifiable, Notification $notification)
    {
        $this->changeTwitterSettingsIfNeeded($notifiable);

        $twitterMessage = $notification->toTwitter($notifiable);
        $twitterMessage = $this->addImagesIfGiven($twitterMessage);

        $this->twitter->post($twitterMessage->getApiEndpoint(), $twitterMessage->getRequestBody($this->twitter),
            $twitterMessage->isJsonRequest);

        if ($this->twitter->getLastHttpCode() !== 200) {
            throw CouldNotSendNotification::serviceRespondsNotSuccessful($this->twitter->getLastBody());
        }
    }
414622
public function setNotificationMethod($methodName)
    {
        if (trim($methodName) == '') {
            $methodName = self::NOTIFY_MAIL;
        }

        $this->notificationMethod = $methodName;
    }
1178725
public function send($notifiable, Notification $notification)
    {
        if (! $url = $notifiable->routeNotificationFor('Webhook')) {
            return;
        }

        $webhookData = $notification->toWebhook($notifiable)->toArray();

        $response = $this->client->post($url, [
            'body' => json_encode(Arr::get($webhookData, 'data')),
            'verify' => false,
            'headers' => Arr::get($webhookData, 'headers'),
        ]);

        if ($response->getStatusCode() >= 300 || $response->getStatusCode() < 200) {
            throw CouldNotSendNotification::serviceRespondedWithAnError($response);
        }
    }
595898
public function send(string $notifiable, Notification $notification)
    {
        $channelResult = $notification->toMail($notifiable);
        $messages = is_array($channelResult) ? $channelResult : [$channelResult];

        foreach ($messages as $message) {
            if (! $message instanceof Message) {
                throw new \Exception("Message needs to be an instance of craft\mail\Message");
            }

            $message->send();
        }
    }