public function SmsProviderInterface::send in SMS Framework 8
Same name and namespace in other branches
- 2.x src/Provider/SmsProviderInterface.php \Drupal\sms\Provider\SmsProviderInterface::send()
- 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 46
Class
- SmsProviderInterface
- Provides an interface for sending messages.
Namespace
Drupal\sms\ProviderCode
public function send(SmsMessageInterface $sms);