12345678910111213141516171819202122232425262728293031323334 |
- <?php
- namespace AliyunMNS\Model;
- use AliyunMNS\Constants;
- use AliyunMNS\Exception\MnsException;
- class WebSocketAttributes
- {
- public $importanceLevel;
- public function __construct($importanceLevel)
- {
- $this->importanceLevel = $importanceLevel;
- }
- public function setImportanceLevel($importanceLevel)
- {
- $this->importanceLevel = $importanceLevel;
- }
- public function getImportanceLevel()
- {
- return $this->importanceLevel;
- }
- public function writeXML(\XMLWriter $xmlWriter)
- {
- $jsonArray = array(Constants::IMPORTANCE_LEVEL => $this->importanceLevel);
- $xmlWriter->writeElement(Constants::WEBSOCKET, json_encode($jsonArray));
- }
- }
- ?>
|