You are here

public function SparkpostQueuedMessageWrapper::__construct in Sparkpost email 7.2

Same name and namespace in other branches
  1. 7 modules/sparkpost_requeue/sparkpost_requeue.queue_message_wrapper.inc \SparkpostQueuedMessageWrapper::__construct()

SparkpostQueuedMessageWrapper constructor.

Parameters

\SparkpostMessageWrapper $message_wrapper: The message wrapper instance. So we can just re-use that.

Overrides SparkpostMessageWrapper::__construct

File

modules/sparkpost_requeue/sparkpost_requeue.queue_message_wrapper.inc, line 30
Class for queued messages.

Class

SparkpostQueuedMessageWrapper
@file Class for queued messages.

Code

public function __construct(SparkpostMessageWrapper $message_wrapper) {
  parent::__construct($message_wrapper
    ->getSparkpostMessage(), $message_wrapper
    ->getDrupalMessage());
  if ($message_wrapper
    ->getResult()) {
    $this
      ->setResult($message_wrapper
      ->getResult());
  }
  if ($message_wrapper
    ->getApiResponseException()) {
    $this
      ->setApiResponseException($message_wrapper
      ->getApiResponseException());
  }
}