You are here

class SmsDeliveryReport in SMS Framework 8

Same name in this branch
  1. 8 src/Message/SmsDeliveryReport.php \Drupal\sms\Message\SmsDeliveryReport
  2. 8 src/Entity/SmsDeliveryReport.php \Drupal\sms\Entity\SmsDeliveryReport
Same name and namespace in other branches
  1. 2.x src/Message/SmsDeliveryReport.php \Drupal\sms\Message\SmsDeliveryReport
  2. 2.1.x src/Message/SmsDeliveryReport.php \Drupal\sms\Message\SmsDeliveryReport

A value object that holds the SMS delivery report.

Hierarchy

Expanded class hierarchy of SmsDeliveryReport

8 files declare their use of SmsDeliveryReport
Incoming.php in tests/modules/sms_test_gateway/src/Plugin/SmsGateway/Incoming.php
LogGateway.php in src/Plugin/SmsGateway/LogGateway.php
Memory.php in tests/modules/sms_test_gateway/src/Plugin/SmsGateway/Memory.php
SmsDevelMessageForm.php in modules/sms_devel/src/Form/SmsDevelMessageForm.php
SmsFrameworkDeliveryReportUnitTest.php in tests/src/Unit/Message/SmsFrameworkDeliveryReportUnitTest.php

... See full list

File

src/Message/SmsDeliveryReport.php, line 8

Namespace

Drupal\sms\Message
View source
class SmsDeliveryReport implements SmsDeliveryReportInterface {

  /**
   * The unique identifier for the message assigned by the gateway.
   *
   * @var string
   */
  protected $messageId = '';

  /**
   * The recipient of the message.
   *
   * @var string
   */
  protected $recipient = '';

  /**
   * Status code for the message.
   *
   * A status code from \Drupal\sms\Message\SmsMessageStatus, or NULL if
   * unknown.
   *
   * @var string|null
   */
  protected $status = NULL;

  /**
   * The status message as provided by the gateway API.
   *
   * @var string
   */
  protected $statusMessage = '';

  /**
   * The timestamp when the delivery report status was updated.
   *
   * @var int
   */
  protected $statusTime = NULL;

  /**
   * The timestamp when the message was queued, or NULL if unknown.
   *
   * @var string|null
   */
  protected $timeQueued = NULL;

  /**
   * The timestamp when the message was delivered, or NULL if unknown.
   *
   * @var string|null
   */
  protected $timeDelivered = NULL;

  /**
   * {@inheritdoc}
   */
  public function getMessageId() {
    return $this->messageId;
  }

  /**
   * {@inheritdoc}
   */
  public function setMessageId($message_id) {
    $this->messageId = $message_id;
    return $this;
  }

  /**
   * {@inheritdoc}
   */
  public function getRecipient() {
    return $this->recipient;
  }

  /**
   * {@inheritdoc}
   */
  public function setRecipient($recipient) {
    $this->recipient = $recipient;
    return $this;
  }

  /**
   * {@inheritdoc}
   */
  public function getStatus() {
    return $this->status;
  }

  /**
   * {@inheritdoc}
   */
  public function setStatus($status) {
    $this->status = $status;
    return $this;
  }

  /**
   * {@inheritdoc}
   */
  public function getStatusMessage() {
    return $this->statusMessage;
  }

  /**
   * {@inheritdoc}
   */
  public function setStatusMessage($message) {
    $this->statusMessage = $message;
    return $this;
  }

  /**
   * {@inheritdoc}
   */
  public function getTimeQueued() {
    return $this->timeQueued;
  }

  /**
   * {@inheritdoc}
   */
  public function setTimeQueued($time) {
    $this->timeQueued = $time;
    return $this;
  }

  /**
   * {@inheritdoc}
   */
  public function getTimeDelivered() {
    return $this->timeDelivered;
  }

  /**
   * {@inheritdoc}
   */
  public function setTimeDelivered($time) {
    $this->timeDelivered = $time;
    return $this;
  }

  /**
   * {@inheritdoc}
   */
  public function getStatusTime() {
    return $this->statusTime;
  }

  /**
   * {@inheritdoc}
   */
  public function setStatusTime($time) {
    $this->statusTime = $time;
    return $this;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
SmsDeliveryReport::$messageId protected property The unique identifier for the message assigned by the gateway.
SmsDeliveryReport::$recipient protected property The recipient of the message.
SmsDeliveryReport::$status protected property Status code for the message.
SmsDeliveryReport::$statusMessage protected property The status message as provided by the gateway API.
SmsDeliveryReport::$statusTime protected property The timestamp when the delivery report status was updated.
SmsDeliveryReport::$timeDelivered protected property The timestamp when the message was delivered, or NULL if unknown.
SmsDeliveryReport::$timeQueued protected property The timestamp when the message was queued, or NULL if unknown.
SmsDeliveryReport::getMessageId public function Gets the gateway tracking ID for the message. Overrides SmsDeliveryReportInterface::getMessageId
SmsDeliveryReport::getRecipient public function Gets the recipient for the message. Overrides SmsDeliveryReportInterface::getRecipient
SmsDeliveryReport::getStatus public function Gets the status of the message. Overrides SmsDeliveryReportInterface::getStatus
SmsDeliveryReport::getStatusMessage public function Gets the status message. Overrides SmsDeliveryReportInterface::getStatusMessage
SmsDeliveryReport::getStatusTime public function Gets the gateway-provided timestamp for the current status. Overrides SmsDeliveryReportInterface::getStatusTime
SmsDeliveryReport::getTimeDelivered public function Gets the time the message was delivered to the recipient. Overrides SmsDeliveryReportInterface::getTimeDelivered
SmsDeliveryReport::getTimeQueued public function Gets the time the message was queued. Overrides SmsDeliveryReportInterface::getTimeQueued
SmsDeliveryReport::setMessageId public function Sets the gateway tracking ID for the message. Overrides SmsDeliveryReportInterface::setMessageId
SmsDeliveryReport::setRecipient public function Sets the recipient for the message. Overrides SmsDeliveryReportInterface::setRecipient
SmsDeliveryReport::setStatus public function Sets the status of the message. Overrides SmsDeliveryReportInterface::setStatus
SmsDeliveryReport::setStatusMessage public function Sets the status message. Overrides SmsDeliveryReportInterface::setStatusMessage
SmsDeliveryReport::setStatusTime public function Sets the gateway-provided timestamp for the current status. Overrides SmsDeliveryReportInterface::setStatusTime
SmsDeliveryReport::setTimeDelivered public function Sets the time the message was delivered to the recipient. Overrides SmsDeliveryReportInterface::setTimeDelivered
SmsDeliveryReport::setTimeQueued public function Sets the time the message was queued. Overrides SmsDeliveryReportInterface::setTimeQueued