Total Complexity | 4 |
Total Lines | 23 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
7 | class WebSocketAttributes |
||
8 | { |
||
9 | public $importanceLevel; |
||
10 | |||
11 | public function __construct($importanceLevel) |
||
12 | { |
||
13 | $this->importanceLevel = $importanceLevel; |
||
14 | } |
||
15 | |||
16 | public function setImportanceLevel($importanceLevel) |
||
17 | { |
||
18 | $this->importanceLevel = $importanceLevel; |
||
19 | } |
||
20 | |||
21 | public function getImportanceLevel() |
||
22 | { |
||
23 | return $this->importanceLevel; |
||
24 | } |
||
25 | |||
26 | public function writeXML(\XMLWriter $xmlWriter) |
||
27 | { |
||
28 | $jsonArray = array(Constants::IMPORTANCE_LEVEL => $this->importanceLevel); |
||
29 | $xmlWriter->writeElement(Constants::WEBSOCKET, json_encode($jsonArray)); |
||
30 | } |
||
34 |