CheckinData.class.php 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. <?php
  2. include_once(__DIR__."/../../utils/Utils.class.php");
  3. class CheckinDataList
  4. {
  5. public $checkindata = null; // CheckinData array
  6. static public function ParseFromArray($arr)
  7. {
  8. $info = new CheckinDataList();
  9. foreach($arr["checkindata"] as $item) {
  10. $info->info[] = CheckinData::ParseFromArray($item);
  11. }
  12. return $info;
  13. }
  14. }
  15. class CheckinData
  16. {
  17. public $userid = null; // string
  18. public $groupname = null; // string
  19. public $checkin_type = null; // string
  20. public $exception_type = null; // string
  21. public $checkin_time = null; // uint
  22. public $location_title = null; // string
  23. public $location_detail = null; // string
  24. public $wifiname = null; // string
  25. public $notes = null; // string
  26. public $wifimac = null; // string
  27. public $mediaids = null; // string array
  28. static public function ParseFromArray($arr)
  29. {
  30. $info = new CheckinData();
  31. $info->userid = Utils::arrayGet($arr, "userid");
  32. $info->groupname = Utils::arrayGet($arr, "groupname");
  33. $info->checkin_type = Utils::arrayGet($arr, "checkin_type");
  34. $info->exception_type = Utils::arrayGet($arr, "exception_type");
  35. $info->checkin_time = Utils::arrayGet($arr, "checkin_time");
  36. $info->location_title = Utils::arrayGet($arr, "location_title");
  37. $info->location_detail = Utils::arrayGet($arr, "location_detail");
  38. $info->wifiname = Utils::arrayGet($arr, "wifiname");
  39. $info->notes = Utils::arrayGet($arr, "notes");
  40. $info->wifimac = Utils::arrayGet($arr, "wifimac");
  41. $info->mediaids = Utils::arrayGet($arr, "mediaids");
  42. return $info;
  43. }
  44. }