1 | <?php |
||
6 | class UpdateSubscriptionAttributes |
||
7 | { |
||
8 | private $subscriptionName; |
||
9 | |||
10 | private $strategy; |
||
11 | |||
12 | # may change in AliyunMNS\Topic |
||
13 | private $topicName; |
||
14 | |||
15 | public function __construct( |
||
16 | $subscriptionName = NULL, |
||
17 | $strategy = NULL) |
||
18 | { |
||
19 | $this->subscriptionName = $subscriptionName; |
||
20 | |||
21 | $this->strategy = $strategy; |
||
22 | } |
||
23 | |||
24 | public function getStrategy() |
||
25 | { |
||
26 | return $this->strategy; |
||
27 | } |
||
28 | |||
29 | public function setStrategy($strategy) |
||
30 | { |
||
31 | $this->strategy = $strategy; |
||
32 | } |
||
33 | |||
34 | public function getTopicName() |
||
35 | { |
||
36 | return $this->topicName; |
||
37 | } |
||
38 | |||
39 | public function setTopicName($topicName) |
||
40 | { |
||
41 | $this->topicName = $topicName; |
||
42 | } |
||
43 | |||
44 | public function getSubscriptionName() |
||
45 | { |
||
46 | return $this->subscriptionName; |
||
47 | } |
||
48 | |||
49 | public function writeXML(\XMLWriter $xmlWriter) |
||
50 | { |
||
51 | if ($this->strategy != NULL) |
||
52 | { |
||
53 | $xmlWriter->writeElement(Constants::STRATEGY, $this->strategy); |
||
54 | } |
||
55 | } |
||
56 | } |
||
57 | |||
59 |