Nav apraksta

MessagePropertiesForReceive.php 999B

12345678910111213141516171819202122232425262728293031323334
  1. <?php
  2. namespace AliyunMNS\Traits;
  3. use AliyunMNS\Model\Message;
  4. use AliyunMNS\Traits\MessagePropertiesForPeek;
  5. trait MessagePropertiesForReceive
  6. {
  7. use MessagePropertiesForPeek;
  8. protected $receiptHandle;
  9. public function getReceiptHandle()
  10. {
  11. return $this->receiptHandle;
  12. }
  13. public function readMessagePropertiesForReceiveXML(\XMLReader $xmlReader, $base64)
  14. {
  15. $message = Message::fromXML($xmlReader, $base64);
  16. $this->messageId = $message->getMessageId();
  17. $this->messageBodyMD5 = $message->getMessageBodyMD5();
  18. $this->messageBody = $message->getMessageBody();
  19. $this->enqueueTime = $message->getEnqueueTime();
  20. $this->nextVisibleTime = $message->getNextVisibleTime();
  21. $this->firstDequeueTime = $message->getFirstDequeueTime();
  22. $this->dequeueCount = $message->getDequeueCount();
  23. $this->priority = $message->getPriority();
  24. $this->receiptHandle = $message->getReceiptHandle();
  25. }
  26. }
  27. ?>