private function buildPayloadDestinationString() { $dst = []; foreach ($this->message->getRecipients() as $recipient) { /* @var $recipient ActorInterface */ $dst[] = $recipient->getContact()->getValue(); } return implode('<', $dst); }
/** * {@inheritdoc} */ public function send(MessageInterface $message) { $this->setMessage($message); $payload = $this->buildPayload(); foreach ($this->message->getRecipients() as $recipient) { /* @var $recipient ActorInterface */ $payload = $this->addPayloadTo($payload, $recipient); $response = $this->executeApiRequest($payload); $this->validateResponse($response); } }