You are here

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

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

Queue a SMS message for sending or receiving.

Parameters

\Drupal\sms\Message\SmsMessageInterface $sms_message: A SMS message.

Return value

\Drupal\sms\Entity\SmsMessageInterface[] The queued messages. A single message may be transformed into many.

Throws

\Drupal\sms\Exception\SmsDirectionException Thrown if no direction is set for the message.

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

1 method overrides SmsProviderInterface::queue()
DefaultSmsProvider::queue in src/Provider/DefaultSmsProvider.php
Queue a SMS message for sending or receiving.

File

src/Provider/SmsProviderInterface.php, line 30

Class

SmsProviderInterface
Provides an interface for sending messages.

Namespace

Drupal\sms\Provider

Code

public function queue(SmsMessageInterface $sms_message);