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