LiveChannelHistory.php 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. <?php
  2. namespace OSS\Model;
  3. /**
  4. * Class LiveChannelHistory
  5. * @package OSS\Model
  6. *
  7. */
  8. class LiveChannelHistory implements XmlConfig
  9. {
  10. public function __construct()
  11. {
  12. }
  13. public function getStartTime()
  14. {
  15. return $this->startTime;
  16. }
  17. public function getEndTime()
  18. {
  19. return $this->endTime;
  20. }
  21. public function getRemoteAddr()
  22. {
  23. return $this->remoteAddr;
  24. }
  25. public function parseFromXmlNode($xml)
  26. {
  27. if (isset($xml->StartTime)) {
  28. $this->startTime = strval($xml->StartTime);
  29. }
  30. if (isset($xml->EndTime)) {
  31. $this->endTime = strval($xml->EndTime);
  32. }
  33. if (isset($xml->RemoteAddr)) {
  34. $this->remoteAddr = strval($xml->RemoteAddr);
  35. }
  36. }
  37. public function parseFromXml($strXml)
  38. {
  39. $xml = simplexml_load_string($strXml);
  40. $this->parseFromXmlNode($xml);
  41. }
  42. public function serializeToXml()
  43. {
  44. throw new OssException("Not implemented.");
  45. }
  46. private $startTime;
  47. private $endTime;
  48. private $remoteAddr;
  49. }