/**
  * ConnectionCountType constructor.
  */
 public function __construct($data)
 {
     if (is_array($data)) {
         $this->xml = $data;
     } else {
         $this->xml = $data = XML2Array::createArray($data);
     }
     $this->xml = $data = collect($data)->first();
     parent::__construct($data);
 }
 public function __construct($data)
 {
     if (is_array($data)) {
         $this->xml = $data;
     } else {
         $this->xml = $data = XML2Array::createArray($data);
     }
     $this->name = isset($data['Name']) ? $data['Name'] : '';
     $this->connections_current = $data['ConnectionsCurrent'];
     $this->connections_total = $data['ConnectionsTotal'];
     $this->connections_total_accepted = $data['ConnectionsTotalAccepted'];
     $this->connections_total_rejected = $data['ConnectionsTotalRejected'];
     $this->messages_in_bytes_rate = $data['MessagesInBytesRate'];
     $this->messages_out_bytes_rate = $data['MessagesOutBytesRate'];
 }
 public function __construct($data)
 {
     if (is_array($data)) {
         $this->xml = $data;
     } else {
         $this->xml = $data = XML2Array::createArray($data);
     }
     $this->name = isset($data['Name']) ? $data['Name'] : '';
     $this->sessions_flash = $data['SessionsFlash'];
     $this->sessions_cupertino = $data['SessionsCupertino'];
     $this->sessions_san_jose = $data['SessionsSanJose'];
     $this->sessions_smooth = $data['SessionsSmooth'];
     $this->sessions_rtsp = $data['SessionsRTSP'];
     $this->sessions_mpeg_dash = $data['SessionsMPEGDash'];
     $this->session_total = $data['SessionsTotal'];
 }
Beispiel #4
0
 /**
  * Convert XML string to array.
  *
  * @param String $xml_string
  * @return mixed
  */
 protected function xmlToArray($xml_string)
 {
     return \Verdant\XML2Array::createArray($xml_string);
 }
 public function connectionCounts()
 {
     $result = XML2Array::createArray($this->connectionCountsRaw());
     return new ServerCountType($result);
 }