You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
34 lines
718 B
34 lines
718 B
4 years ago
|
<?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));
|
||
|
}
|
||
|
}
|
||
|
|
||
|
?>
|