smsplatform-1.0.x-dev/src/Event/SmsDeliveryReportEvent.php

src/Event/SmsDeliveryReportEvent.php
<?php

declare(strict_types=1);

namespace Drupal\smsplatform\Event;

use Symfony\Component\HttpFoundation\Response;
use Symfony\Contracts\EventDispatcher\Event;

/**
 * Handle a received delivery report.
 *
 * @see \Drupal\smsplatform\Event\SmsEvents
 */
class SmsDeliveryReportEvent extends Event {

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

  /**
   * The SMS delivery reports.
   *
   * @var \Drupal\smsplatform\Message\SmsDeliveryReportInterface[]
   */
  protected array $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\smsplatform\Message\SmsDeliveryReportInterface[]
   *   The delivery reports on this event.
   */
  public function getReports() {
    return $this->reports;
  }

  /**
   * Set the delivery reports on this event.
   *
   * @param \Drupal\smsplatform\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;
  }

}

Главная | Обратная связь

drupal hosting | друпал хостинг | it patrol .inc