SendMessageRequestItem.php 661 B

123456789101112131415161718192021222324252627
  1. <?php
  2. namespace AliyunMNS\Model;
  3. use AliyunMNS\Constants;
  4. use AliyunMNS\Traits\MessagePropertiesForSend;
  5. // this class is used for BatchSend
  6. class SendMessageRequestItem
  7. {
  8. use MessagePropertiesForSend;
  9. public function __construct($messageBody, $delaySeconds = NULL, $priority = NULL)
  10. {
  11. $this->messageBody = $messageBody;
  12. $this->delaySeconds = $delaySeconds;
  13. $this->priority = $priority;
  14. }
  15. public function writeXML(\XMLWriter $xmlWriter, $base64)
  16. {
  17. $xmlWriter->startELement('Message');
  18. $this->writeMessagePropertiesForSendXML($xmlWriter, $base64);
  19. $xmlWriter->endElement();
  20. }
  21. }
  22. ?>