1 | <?php |
||
21 | class MPNSBase extends MessageBase |
||
22 | { |
||
23 | /** |
||
24 | * The maximum size allowed for MPNS message payload is 3K bytes |
||
25 | */ |
||
26 | const PAYLOAD_MAX_LENGTH = 3072; |
||
27 | |||
28 | /** |
||
29 | * MPNs does not support multicast sending |
||
30 | */ |
||
31 | const MAX_RECIPIENTS_PER_MESSAGE_COUNT = 1; |
||
32 | |||
33 | /** |
||
34 | * Notification delivery interval |
||
35 | * |
||
36 | * @var int |
||
37 | */ |
||
38 | protected $delayInterval; |
||
39 | |||
40 | /** |
||
41 | * @return string |
||
42 | */ |
||
43 | public function getMessageType() |
||
47 | |||
48 | /** |
||
49 | * @return string |
||
50 | */ |
||
51 | public function getMPNSType() |
||
55 | |||
56 | /** |
||
57 | * No expiration time available in MPN |
||
58 | * |
||
59 | * @throws BadMethodCallException |
||
60 | */ |
||
61 | public function getExpirationTime() |
||
65 | |||
66 | /** |
||
67 | * @return int |
||
68 | */ |
||
69 | public function getDelayInterval() |
||
76 | |||
77 | /** |
||
78 | * @param int $delayInterval |
||
79 | * @return $this |
||
80 | */ |
||
81 | public function setDelayInterval($delayInterval) |
||
94 | |||
95 | /** |
||
96 | * @return \DOMDocument |
||
97 | */ |
||
98 | public function createPayload() |
||
125 | |||
126 | /** |
||
127 | * @param \DOMDocument $payload |
||
128 | * @return string |
||
129 | */ |
||
130 | public function packPayload($payload) |
||
134 | |||
135 | /** |
||
136 | * {@inheritdoc} |
||
137 | */ |
||
138 | public function validateRecipient($token) |
||
148 | |||
149 | /** |
||
150 | * @return string |
||
151 | */ |
||
152 | public function __toString() |
||
156 | |||
157 | /** |
||
158 | * @return \ReflectionProperty[] |
||
159 | */ |
||
160 | protected function getPropertiesList() |
||
167 | } |
||
168 |