No Description

UmengUappGetDurationsResult.class.php 2.5KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. <?php
  2. include_once ('com/alibaba/openapi/client/entity/SDKDomain.class.php');
  3. include_once ('com/alibaba/openapi/client/entity/ByteArray.class.php');
  4. include_once ('com/umeng/uapp/param/UmengUappDurationInfo.class.php');
  5. class UmengUappGetDurationsResult {
  6. private $durationInfos;
  7. /**
  8. * @return
  9. */
  10. public function getDurationInfos() {
  11. return $this->durationInfos;
  12. }
  13. /**
  14. * 设置
  15. * @param array include @see UmengUappDurationInfo[] $durationInfos
  16. * 此参数必填 */
  17. public function setDurationInfos(UmengUappDurationInfo $durationInfos) {
  18. $this->durationInfos = $durationInfos;
  19. }
  20. private $average;
  21. /**
  22. * @return 每次启动的平均使用时长
  23. */
  24. public function getAverage() {
  25. return $this->average;
  26. }
  27. /**
  28. * 设置每次启动的平均使用时长
  29. * @param Double $average
  30. * 此参数必填 */
  31. public function setAverage( $average) {
  32. $this->average = $average;
  33. }
  34. private $stdResult;
  35. public function setStdResult($stdResult) {
  36. $this->stdResult = $stdResult;
  37. if (array_key_exists ( "durationInfos", $this->stdResult )) {
  38. $durationInfosResult=$this->stdResult->{"durationInfos"};
  39. $object = json_decode ( json_encode ( $durationInfosResult ), true );
  40. $this->durationInfos = array ();
  41. for($i = 0; $i < count ( $object ); $i ++) {
  42. $arrayobject = new ArrayObject ( $object [$i] );
  43. $UmengUappDurationInfoResult=new UmengUappDurationInfo();
  44. $UmengUappDurationInfoResult->setArrayResult($arrayobject );
  45. $this->durationInfos [$i] = $UmengUappDurationInfoResult;
  46. }
  47. }
  48. if (array_key_exists ( "average", $this->stdResult )) {
  49. $this->average = $this->stdResult->{"average"};
  50. }
  51. }
  52. private $arrayResult;
  53. public function setArrayResult($arrayResult) {
  54. $this->arrayResult = $arrayResult;
  55. if (array_key_exists ( "durationInfos", $this->arrayResult )) {
  56. $durationInfosResult=$arrayResult['durationInfos'];
  57. $this->durationInfos = new UmengUappDurationInfo();
  58. $this->durationInfos->setStdResult ( $durationInfosResult);
  59. }
  60. if (array_key_exists ( "average", $this->arrayResult )) {
  61. $this->average = $arrayResult['average'];
  62. }
  63. }
  64. }
  65. ?>