mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-19 10:23:16 +09:00
Add more comments to recipient handling part of code
This commit is contained in:
parent
903571fc63
commit
8c5e34edea
1 changed files with 5 additions and 1 deletions
|
|
@ -52,14 +52,18 @@ class CoolSMS extends Base implements \Rhymix\Framework\Drivers\SMSInterface
|
|||
// Initialize the sender.
|
||||
$sender = new \Nurigo\Api\Message($this->_config['api_key'], $this->_config['api_secret']);
|
||||
|
||||
// Get recipients.
|
||||
// Get the list of recipients.
|
||||
$recipients = $message->getRecipientsGroupedByCountry();
|
||||
|
||||
// Group the recipients by country code.
|
||||
foreach ($recipients as $country => $country_recipients)
|
||||
{
|
||||
// Merge recipients into groups of 1000.
|
||||
$country_recipients = array_map(function($chunk) {
|
||||
return implode(',', $chunk);
|
||||
}, array_chunk($country_recipients, 1000));
|
||||
|
||||
// Send to each set of merged recipients.
|
||||
foreach ($country_recipients as $recipient_number)
|
||||
{
|
||||
// Populate the options object.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue