OSS\Model\GetLiveChannelStatus::parseFromXml PHP Method

parseFromXml() public method

public parseFromXml ( $strXml )
    public function parseFromXml($strXml)
    {
        $xml = simplexml_load_string($strXml);
        $this->status = strval($xml->Status);
        $this->connectedTime = strval($xml->ConnectedTime);
        $this->remoteAddr = strval($xml->RemoteAddr);
        if (isset($xml->Video)) {
            foreach ($xml->Video as $video) {
                $this->videoWidth = intval($video->Width);
                $this->videoHeight = intval($video->Height);
                $this->videoFrameRate = intval($video->FrameRate);
                $this->videoBandwidth = intval($video->Bandwidth);
                $this->videoCodec = strval($video->Codec);
            }
        }
        if (isset($xml->Video)) {
            foreach ($xml->Audio as $audio) {
                $this->audioBandwidth = intval($audio->Bandwidth);
                $this->audioSampleRate = intval($audio->SampleRate);
                $this->audioCodec = strval($audio->Codec);
            }
        }
    }

Usage Example

 /**
  * @return
  */
 protected function parseDataFromResponse()
 {
     $content = $this->rawResponse->body;
     $channelList = new GetLiveChannelStatus();
     $channelList->parseFromXml($content);
     return $channelList;
 }
All Usage Examples Of OSS\Model\GetLiveChannelStatus::parseFromXml