No Description

UmengUappGetAppListResult.class.php 3.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. <?php
  2. include_once (app_path('/libs/Umeng/').'com/alibaba/openapi/client/entity/SDKDomain.class.php');
  3. include_once (app_path('/libs/Umeng/').'com/alibaba/openapi/client/entity/ByteArray.class.php');
  4. include_once (app_path('/libs/Umeng/').'com/umeng/uapp/param/UmengUappAppInfoData.class.php');
  5. class UmengUappGetAppListResult {
  6. private $appInfos;
  7. /**
  8. * @return
  9. */
  10. public function getAppInfos() {
  11. return $this->appInfos;
  12. }
  13. /**
  14. * 设置
  15. * @param array include @see UmengUappAppInfoData[] $appInfos
  16. * 此参数必填 */
  17. public function setAppInfos(UmengUappAppInfoData $appInfos) {
  18. $this->appInfos = $appInfos;
  19. }
  20. private $totalPage;
  21. /**
  22. * @return 总页数
  23. */
  24. public function getTotalPage() {
  25. return $this->totalPage;
  26. }
  27. /**
  28. * 设置总页数
  29. * @param Integer $totalPage
  30. * 此参数必填 */
  31. public function setTotalPage( $totalPage) {
  32. $this->totalPage = $totalPage;
  33. }
  34. private $page;
  35. /**
  36. * @return 页数
  37. */
  38. public function getPage() {
  39. return $this->page;
  40. }
  41. /**
  42. * 设置页数
  43. * @param Integer $page
  44. * 此参数必填 */
  45. public function setPage( $page) {
  46. $this->page = $page;
  47. }
  48. private $stdResult;
  49. public function setStdResult($stdResult) {
  50. $this->stdResult = $stdResult;
  51. if (array_key_exists ( "appInfos", $this->stdResult )) {
  52. $appInfosResult=$this->stdResult->{"appInfos"};
  53. $object = json_decode ( json_encode ( $appInfosResult ), true );
  54. $this->appInfos = array ();
  55. for($i = 0; $i < count ( $object ); $i ++) {
  56. $arrayobject = new ArrayObject ( $object [$i] );
  57. $UmengUappAppInfoDataResult=new UmengUappAppInfoData();
  58. $UmengUappAppInfoDataResult->setArrayResult($arrayobject );
  59. $this->appInfos [$i] = $UmengUappAppInfoDataResult;
  60. }
  61. }
  62. if (array_key_exists ( "totalPage", $this->stdResult )) {
  63. $this->totalPage = $this->stdResult->{"totalPage"};
  64. }
  65. if (array_key_exists ( "page", $this->stdResult )) {
  66. $this->page = $this->stdResult->{"page"};
  67. }
  68. }
  69. private $arrayResult;
  70. public function setArrayResult($arrayResult) {
  71. $this->arrayResult = $arrayResult;
  72. if (array_key_exists ( "appInfos", $this->arrayResult )) {
  73. $appInfosResult=$arrayResult['appInfos'];
  74. $this->appInfos = new UmengUappAppInfoData();
  75. $this->appInfos->setStdResult ( $appInfosResult);
  76. }
  77. if (array_key_exists ( "totalPage", $this->arrayResult )) {
  78. $this->totalPage = $arrayResult['totalPage'];
  79. }
  80. if (array_key_exists ( "page", $this->arrayResult )) {
  81. $this->page = $arrayResult['page'];
  82. }
  83. }
  84. }
  85. ?>