QueuedMessageWrapper.php in Sparkpost email 8.2
File
modules/sparkpost_requeue/src/QueuedMessageWrapper.php
View source
<?php
namespace Drupal\sparkpost_requeue;
use Drupal\sparkpost\ClientServiceInterface;
use Drupal\sparkpost\MessageWrapper;
use Drupal\sparkpost\MessageWrapperInterface;
class QueuedMessageWrapper extends MessageWrapper implements MessageWrapperInterface {
protected $retryCount = 0;
protected $lastRetry = 0;
protected $clientService;
public function __construct(ClientServiceInterface $clientService) {
$this->clientService = $clientService;
if ($this
->getResult()) {
$this
->setResult($this
->getResult());
}
if ($this
->getApiResponseException()) {
$this
->setApiResponseException($this
->getApiResponseException());
}
}
public function getRetryCount() {
return $this->retryCount;
}
public function incrementRetryCount() {
$this->retryCount++;
}
public function getLastRetry() {
return $this->lastRetry;
}
public function setLastRetry($lastRetry) {
$this->lastRetry = $lastRetry;
}
}