interface SmsGatewayPluginInterface in SMS Framework 2.x
Same name and namespace in other branches
- 8 src/Plugin/SmsGatewayPluginInterface.php \Drupal\sms\Plugin\SmsGatewayPluginInterface
- 2.1.x src/Plugin/SmsGatewayPluginInterface.php \Drupal\sms\Plugin\SmsGatewayPluginInterface
Default implementation of SMS gateway plugin.
Hierarchy
- interface \Drupal\Component\Plugin\ConfigurableInterface; interface \Drupal\Component\Plugin\DependentPluginInterface; interface \Drupal\Core\Plugin\PluginFormInterface; interface \Drupal\Component\Plugin\PluginInspectionInterface
- interface \Drupal\sms\Plugin\SmsGatewayPluginInterface
Expanded class hierarchy of SmsGatewayPluginInterface
All classes that implement SmsGatewayPluginInterface
File
- src/
Plugin/ SmsGatewayPluginInterface.php, line 18
Namespace
Drupal\sms\PluginView source
interface SmsGatewayPluginInterface extends ConfigurableInterface, DependentPluginInterface, PluginFormInterface, PluginInspectionInterface {
/**
* Sends an SMS.
*
* @param \Drupal\sms\Message\SmsMessageInterface $sms
* The sms to be sent.
*
* @return \Drupal\sms\Message\SmsMessageResultInterface
* The result of the sms messaging operation.
*/
public function send(SmsMessageInterface $sms);
/**
* Returns the credit balance available on this gateway.
*
* The 'credit_balance_available' plugin annotation should be set to inform
* the framework whether this gateway supports balance queries.
*
* @return float|null
* The credit balance of the gateway, or NULL if unknown.
*/
public function getCreditsBalance();
/**
* Parses incoming delivery reports and returns the created delivery reports.
*
* The request contains delivery reports pushed to the site in a format
* supplied by the gateway API. This method transforms the raw request into
* delivery report objects usable by SMS Framework.
*
* @param \Symfony\Component\HttpFoundation\Request $request
* Request object containing the unprocessed delivery reports.
* @param \Symfony\Component\HttpFoundation\Response $response
* HTTP response to return to the server pushing the raw delivery reports.
*
* @return \Drupal\sms\Message\SmsDeliveryReportInterface[]
* An array of delivery reports created from the request.
*/
public function parseDeliveryReports(Request $request, Response $response);
/**
* Gets delivery reports from the gateway.
*
* @param string[]|null $message_ids
* A list of specific message ID's to pull, or NULL to get any reports which
* have not been requested previously.
*
* @return \Drupal\sms\Message\SmsDeliveryReportInterface[]
* An array of the delivery reports which have been pulled.
*/
public function getDeliveryReports(array $message_ids = NULL);
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
ConfigurableInterface:: |
public | function | Gets default configuration for this plugin. | 14 |
ConfigurableInterface:: |
public | function | Gets this plugin's configuration. | 15 |
ConfigurableInterface:: |
public | function | Sets the configuration for this plugin instance. | 15 |
DependentPluginInterface:: |
public | function | Calculates dependencies for the configured plugin. | 20 |
PluginFormInterface:: |
public | function | Form constructor. | 37 |
PluginFormInterface:: |
public | function | Form submission handler. | 32 |
PluginFormInterface:: |
public | function | Form validation handler. | 18 |
PluginInspectionInterface:: |
public | function | Gets the definition of the plugin implementation. | 4 |
PluginInspectionInterface:: |
public | function | Gets the plugin_id of the plugin instance. | 2 |
SmsGatewayPluginInterface:: |
public | function | Returns the credit balance available on this gateway. | 1 |
SmsGatewayPluginInterface:: |
public | function | Gets delivery reports from the gateway. | 1 |
SmsGatewayPluginInterface:: |
public | function | Parses incoming delivery reports and returns the created delivery reports. | 1 |
SmsGatewayPluginInterface:: |
public | function | Sends an SMS. | 4 |