diff options
author | Hannes Kindströmmer <hannes@kindstrommer.se> | 2017-03-07 15:15:46 +0100 |
---|---|---|
committer | Hannes Kindströmmer <hannes@kindstrommer.se> | 2017-03-07 15:15:46 +0100 |
commit | d303ce63873c82dc960b91460b87e7875f46ab2c (patch) | |
tree | 4d553384ae70664415962090788a738ff55f2893 /src | |
parent | d9164f61d6afb46fc0f73ff1ef18bfdd148b581d (diff) | |
download | ip1-php-sdk-d303ce63873c82dc960b91460b87e7875f46ab2c.zip ip1-php-sdk-d303ce63873c82dc960b91460b87e7875f46ab2c.tar.gz ip1-php-sdk-d303ce63873c82dc960b91460b87e7875f46ab2c.tar.bz2 |
Add QoL function
Diffstat (limited to 'src')
-rw-r--r-- | src/Recipient/RecipientFactory.php | 8 |
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 |