You are here

public function SmsProviderInterface::send in SMS Framework 2.x

Same name and namespace in other branches
  1. 8 src/Provider/SmsProviderInterface.php \Drupal\sms\Provider\SmsProviderInterface::send()
  2. 2.1.x src/Provider/SmsProviderInterface.php \Drupal\sms\Provider\SmsProviderInterface::send()

Sends an SMS using the active gateway.

It is preferred to use queue method over directly invoking send().

Parameters

\Drupal\sms\Message\SmsMessageInterface $sms: The message to be sent.

Return value

\Drupal\sms\Message\SmsMessageInterface[] The messages sent in this sending operation. The message sent can be transformed into multiple messages depending on gateway and event subscribers. Therefore this function can return multiple messages.

Throws

\Drupal\sms\Exception\RecipientRouteException Thrown if no gateway could be determined for the message.

1 method overrides SmsProviderInterface::send()
DefaultSmsProvider::send in src/Provider/DefaultSmsProvider.php
Sends an SMS using the active gateway.

File

src/Provider/SmsProviderInterface.php, line 48

Class

SmsProviderInterface
Provides an interface for sending messages.

Namespace

Drupal\sms\Provider

Code

public function send(SmsMessageInterface $sms);