GetLiveChannelInfo.php 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. <?php
  2. namespace OSS\Model;
  3. /**
  4. * Class GetLiveChannelInfo
  5. * @package OSS\Model
  6. */
  7. class GetLiveChannelInfo implements XmlConfig
  8. {
  9. public function getDescription()
  10. {
  11. return $this->description;
  12. }
  13. public function getStatus()
  14. {
  15. return $this->status;
  16. }
  17. public function getType()
  18. {
  19. return $this->type;
  20. }
  21. public function getFragDuration()
  22. {
  23. return $this->fragDuration;
  24. }
  25. public function getFragCount()
  26. {
  27. return $this->fragCount;
  28. }
  29. public function getPlayListName()
  30. {
  31. return $this->playlistName;
  32. }
  33. public function parseFromXml($strXml)
  34. {
  35. $xml = simplexml_load_string($strXml);
  36. $this->description = strval($xml->Description);
  37. $this->status = strval($xml->Status);
  38. if (isset($xml->Target)) {
  39. foreach ($xml->Target as $target) {
  40. $this->type = strval($target->Type);
  41. $this->fragDuration = strval($target->FragDuration);
  42. $this->fragCount = strval($target->FragCount);
  43. $this->playlistName = strval($target->PlaylistName);
  44. }
  45. }
  46. }
  47. public function serializeToXml()
  48. {
  49. throw new OssException("Not implemented.");
  50. }
  51. private $description;
  52. private $status;
  53. private $type;
  54. private $fragDuration;
  55. private $fragCount;
  56. private $playlistName;
  57. }