public function SmsMessageResult::getReport in SMS Framework 2.1.x
Same name in this branch
- 2.1.x src/Message/SmsMessageResult.php \Drupal\sms\Message\SmsMessageResult::getReport()
- 2.1.x src/Entity/SmsMessageResult.php \Drupal\sms\Entity\SmsMessageResult::getReport()
Same name and namespace in other branches
- 8 src/Message/SmsMessageResult.php \Drupal\sms\Message\SmsMessageResult::getReport()
- 2.x src/Message/SmsMessageResult.php \Drupal\sms\Message\SmsMessageResult::getReport()
Gets the delivery report for a particular recipient.
Parameters
string $recipient: The number of the recipient for which the report is to be retrieved.
Return value
\Drupal\sms\Message\SmsDeliveryReportInterface|null A delivery report object, or NULL if there is no report for the recipient.
Overrides SmsMessageResultInterface::getReport
See also
SmsMessageResultInterface::getReports()
File
- src/
Message/ SmsMessageResult.php, line 86
Class
- SmsMessageResult
- The result of an SMS messaging transaction.
Namespace
Drupal\sms\MessageCode
public function getReport($recipient) {
foreach ($this->reports as $report) {
if ($report
->getRecipient() == $recipient) {
return $report;
}
}
return NULL;
}