smsplatform-1.0.x-dev/src/SmsProcessingResponse.php

src/SmsProcessingResponse.php
<?php

declare(strict_types=1);

namespace Drupal\smsplatform;

/**
 * Defines a container for SMS objects for processing and a request response.
 */
class SmsProcessingResponse {

  /**
   * An array of messages to process.
   *
   * @var \Drupal\smsplatform\Message\SmsMessageInterface[]
   */
  protected array $messages = [];

  /**
   * The response to pass to the request controller.
   *
   * @var mixed
   */
  protected mixed $response;

  /**
   * Get an array of messages to process.
   *
   * @return \Drupal\smsplatform\Message\SmsMessageInterface[]
   *   An array of messages to process.
   */
  public function getMessages() {
    return $this->messages;
  }

  /**
   * Set an array of messages to process.
   *
   * @param \Drupal\smsplatform\Message\SmsMessageInterface[] $messages
   *   An array of messages to process.
   *
   * @return $this
   *   Return this object for chaining.
   */
  public function setMessages(array $messages) {
    $this->messages = $messages;
    return $this;
  }

  /**
   * Get the response to pass to the request controller.
   *
   * @return mixed
   *   The response to pass to the request controller.
   */
  public function getResponse() {
    return $this->response;
  }

  /**
   * Set the response to pass to the request controller.
   *
   * @param mixed $response
   *   Set the response to pass to the request controller.
   *
   * @return $this
   *   Return this object for chaining.
   */
  public function setResponse($response) {
    $this->response = $response;
    return $this;
  }

}

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

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