No Description

ListSubscriptionRequest.php 1.8KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. <?php
  2. namespace AliyunMNS\Requests;
  3. use AliyunMNS\Requests\BaseRequest;
  4. class ListSubscriptionRequest extends BaseRequest
  5. {
  6. private $topicName;
  7. private $retNum;
  8. private $prefix;
  9. private $marker;
  10. public function __construct(
  11. $topicName,
  12. $retNum = NULL,
  13. $prefix = NULL,
  14. $marker = NULL)
  15. {
  16. parent::__construct('get', 'topics/' . $topicName . '/subscriptions');
  17. $this->topicName = $topicName;
  18. $this->setRetNum($retNum);
  19. $this->setPrefix($prefix);
  20. $this->setMarker($marker);
  21. }
  22. public function getTopicName()
  23. {
  24. return $this->topicName;
  25. }
  26. public function getRetNum()
  27. {
  28. return $this->retNum;
  29. }
  30. public function setRetNum($retNum)
  31. {
  32. $this->retNum = $retNum;
  33. if ($retNum != NULL)
  34. {
  35. $this->setHeader("x-mns-ret-number", $retNum);
  36. }
  37. else
  38. {
  39. $this->removeHeader("x-mns-ret-number");
  40. }
  41. }
  42. public function getPrefix()
  43. {
  44. return $this->prefix;
  45. }
  46. public function setPrefix($prefix)
  47. {
  48. $this->prefis = $prefix;
  49. if ($prefix != NULL)
  50. {
  51. $this->setHeader("x-mns-prefix", $prefix);
  52. }
  53. else
  54. {
  55. $this->removeHeader("x-mns-prefix");
  56. }
  57. }
  58. public function getMarker()
  59. {
  60. return $this->marker;
  61. }
  62. public function setMarker($marker)
  63. {
  64. $this->marker = $marker;
  65. if ($marker != NULL)
  66. {
  67. $this->setHeader("x-mns-marker", $marker);
  68. }
  69. else
  70. {
  71. $this->removeHeader("x-mns-marker");
  72. }
  73. }
  74. public function generateBody()
  75. {
  76. return NULL;
  77. }
  78. public function generateQueryString()
  79. {
  80. return NULL;
  81. }
  82. }
  83. ?>