You are here

class SmsProcessingResponse in SMS Framework 8

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

Defines a container for SMS objects for processing and a request response.

Hierarchy

Expanded class hierarchy of SmsProcessingResponse

1 file declares its use of SmsProcessingResponse
Incoming.php in tests/modules/sms_test_gateway/src/Plugin/SmsGateway/Incoming.php

File

src/SmsProcessingResponse.php, line 8

Namespace

Drupal\sms
View source
class SmsProcessingResponse {

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

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

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

  /**
   * Set an array of messages to process.
   *
   * @param \Drupal\sms\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;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
SmsProcessingResponse::$messages protected property An array of messages to process.
SmsProcessingResponse::$response protected property The response to pass to the request controller.
SmsProcessingResponse::getMessages public function Get an array of messages to process.
SmsProcessingResponse::getResponse public function Get the response to pass to the request controller.
SmsProcessingResponse::setMessages public function Set an array of messages to process.
SmsProcessingResponse::setResponse public function Set the response to pass to the request controller.