class DeliveryReportController in SMS Framework 8
Same name and namespace in other branches
- 2.x src/DeliveryReportController.php \Drupal\sms\DeliveryReportController
- 2.1.x src/DeliveryReportController.php \Drupal\sms\DeliveryReportController
Provides delivery reports acknowledgement and passes to the correct gateway.
Hierarchy
- class \Drupal\sms\DeliveryReportController implements ContainerInjectionInterface
Expanded class hierarchy of DeliveryReportController
File
- src/
DeliveryReportController.php, line 14
Namespace
Drupal\smsView source
class DeliveryReportController implements ContainerInjectionInterface {
/**
* The SMS Provider.
*
* @var \Drupal\sms\Provider\SmsProviderInterface
*/
protected $smsProvider;
/**
* The request stack.
*
* @var \Symfony\Component\HttpFoundation\RequestStack
*/
protected $requestStack;
/**
* Creates an new delivery report controller.
*
* @param \Drupal\sms\Provider\SmsProviderInterface $sms_provider
* The SMS service provider.
*/
public function __construct(SmsProviderInterface $sms_provider) {
$this->smsProvider = $sms_provider;
}
/**
* {@inheritdoc}
*/
public static function create(ContainerInterface $container) {
return new static($container
->get('sms.provider'));
}
/**
* Acknowledges delivery reports and passes them to the correct gateway.
*
* @param \Symfony\Component\HttpFoundation\Request $request
* The current request.
* @param \Drupal\sms\Entity\SmsGatewayInterface $sms_gateway
* The gateway which is handling the the delivery report.
*
* @return \Symfony\Component\HttpFoundation\Response
* A response object to return.
*/
public function processDeliveryReport(Request $request, SmsGatewayInterface $sms_gateway) {
return $this->smsProvider
->processDeliveryReport($request, $sms_gateway);
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
DeliveryReportController:: |
protected | property | The request stack. | |
DeliveryReportController:: |
protected | property | The SMS Provider. | |
DeliveryReportController:: |
public static | function |
Instantiates a new instance of this class. Overrides ContainerInjectionInterface:: |
|
DeliveryReportController:: |
public | function | Acknowledges delivery reports and passes them to the correct gateway. | |
DeliveryReportController:: |
public | function | Creates an new delivery report controller. |