No Description

MessageIdAndMD5.php 599B

12345678910111213141516171819202122232425262728293031
  1. <?php
  2. namespace AliyunMNS\Traits;
  3. use AliyunMNS\Constants;
  4. use AliyunMNS\Model\Message;
  5. trait MessageIdAndMD5
  6. {
  7. protected $messageId;
  8. protected $messageBodyMD5;
  9. public function getMessageId()
  10. {
  11. return $this->messageId;
  12. }
  13. public function getMessageBodyMD5()
  14. {
  15. return $this->messageBodyMD5;
  16. }
  17. public function readMessageIdAndMD5XML(\XMLReader $xmlReader)
  18. {
  19. $message = Message::fromXML($xmlReader, TRUE);
  20. $this->messageId = $message->getMessageId();
  21. $this->messageBodyMD5 = $message->getMessageBodyMD5();
  22. }
  23. }
  24. ?>