You are here

class SmsDeliveryReportEvent in SMS Framework 8

Same name and namespace in other branches
  1. 2.x src/Event/SmsDeliveryReportEvent.php \Drupal\sms\Event\SmsDeliveryReportEvent
  2. 2.1.x src/Event/SmsDeliveryReportEvent.php \Drupal\sms\Event\SmsDeliveryReportEvent

Handle a received delivery report.

Hierarchy

Expanded class hierarchy of SmsDeliveryReportEvent

See also

\Drupal\sms\Event\SmsEvents

2 files declare their use of SmsDeliveryReportEvent
DefaultSmsProvider.php in src/Provider/DefaultSmsProvider.php
SmsDeliveryReportsProcessor.php in src/EventSubscriber/SmsDeliveryReportsProcessor.php

File

src/Event/SmsDeliveryReportEvent.php, line 13

Namespace

Drupal\sms\Event
View source
class SmsDeliveryReportEvent extends Event {

  /**
   * The response to receiving a pushed delivery report.
   *
   * @var \Symfony\Component\HttpFoundation\Response
   */
  protected $response;

  /**
   * The SMS delivery reports.
   *
   * @var \Drupal\sms\Message\SmsDeliveryReportInterface[]
   */
  protected $reports;

  /**
   * Get the response for this event.
   *
   * @return \Symfony\Component\HttpFoundation\Response
   *   The response for this event.
   */
  public function getResponse() {
    return $this->response;
  }

  /**
   * Set the response on this event.
   *
   * @param \Symfony\Component\HttpFoundation\Response $response
   *   The response to set for this event.
   *
   * @return $this
   *   Returns this event for chaining.
   */
  public function setResponse(Response $response) {
    $this->response = $response;
    return $this;
  }

  /**
   * Get all delivery reports on this event.
   *
   * @return \Drupal\sms\Message\SmsDeliveryReportInterface[]
   *   The delivery reports on this event.
   */
  public function getReports() {
    return $this->reports;
  }

  /**
   * Set the delivery reports on this event.
   *
   * @param \Drupal\sms\Message\SmsDeliveryReportInterface[] $reports
   *   The delivery reports to set on this event.
   *
   * @return $this
   *   Returns this event for chaining.
   */
  public function setReports(array $reports) {
    $this->reports = $reports;
    return $this;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
SmsDeliveryReportEvent::$reports protected property The SMS delivery reports.
SmsDeliveryReportEvent::$response protected property The response to receiving a pushed delivery report.
SmsDeliveryReportEvent::getReports public function Get all delivery reports on this event.
SmsDeliveryReportEvent::getResponse public function Get the response for this event.
SmsDeliveryReportEvent::setReports public function Set the delivery reports on this event.
SmsDeliveryReportEvent::setResponse public function Set the response on this event.