UpdateSubscriptionAttributes.php 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. <?php
  2. namespace AliyunMNS\Model;
  3. use AliyunMNS\Constants;
  4. class UpdateSubscriptionAttributes
  5. {
  6. private $subscriptionName;
  7. private $strategy;
  8. # may change in AliyunMNS\Topic
  9. private $topicName;
  10. public function __construct(
  11. $subscriptionName = NULL,
  12. $strategy = NULL)
  13. {
  14. $this->subscriptionName = $subscriptionName;
  15. $this->strategy = $strategy;
  16. }
  17. public function getStrategy()
  18. {
  19. return $this->strategy;
  20. }
  21. public function setStrategy($strategy)
  22. {
  23. $this->strategy = $strategy;
  24. }
  25. public function getTopicName()
  26. {
  27. return $this->topicName;
  28. }
  29. public function setTopicName($topicName)
  30. {
  31. $this->topicName = $topicName;
  32. }
  33. public function getSubscriptionName()
  34. {
  35. return $this->subscriptionName;
  36. }
  37. public function writeXML(\XMLWriter $xmlWriter)
  38. {
  39. if ($this->strategy != NULL)
  40. {
  41. $xmlWriter->writeElement(Constants::STRATEGY, $this->strategy);
  42. }
  43. }
  44. }
  45. ?>