summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Recipient/RecipientFactory.php8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/Recipient/RecipientFactory.php b/src/Recipient/RecipientFactory.php
index 1dcd2cf..ce987d6 100644
--- a/src/Recipient/RecipientFactory.php
+++ b/src/Recipient/RecipientFactory.php
@@ -89,6 +89,14 @@ class RecipientFactory
{
return self::createProcessedContactFromStdClass(json_decode($jsonContact));
}
+ public static function createProcessedContactFromStdClassArray(array $contactArray): array
+ {
+ $contacts = [];
+ foreach ($contactArray as $c) {
+ $contacts[] = self::createProcessedContactFromStdClass($c);
+ }
+ return $contacts;
+ }
/**
* Creates a ProcessedContact using the stdClass given.
* @param \stdClass $stdContact An stdClass object matching the format of the IP1 SMS API