Bez popisu

UpdateSubscriptionAttributes.php 1.0KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  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. ?>