GTSettings.php 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. <?php
  2. require_once(dirname(__FILE__) . '/' . 'GTStrategy.php');
  3. class GTSettings extends GTApiRequest
  4. {
  5. /**
  6. * 消息离线时间设置,单位毫秒,-1表示不设离线, -1 ~ 3 * 24 * 3600 * 1000之间
  7. */
  8. private $ttl;
  9. /**
  10. * 厂商通道策略
  11. */
  12. private $strategy;
  13. /**
  14. * 推送速度
  15. */
  16. private $speed;
  17. /**
  18. * 定时推送时间,格式:毫秒时间戳
  19. */
  20. private $scheduleTime;
  21. public function getTtl()
  22. {
  23. return $this->ttl;
  24. }
  25. public function setTtl($ttl)
  26. {
  27. $this->ttl = $ttl;
  28. $this->apiParam["ttl"] = $ttl;
  29. }
  30. public function getStrategy()
  31. {
  32. return $this->strategy;
  33. }
  34. public function setStrategy($strategy)
  35. {
  36. $this->strategy = $strategy;
  37. }
  38. public function getSpeed()
  39. {
  40. return $this->speed;
  41. }
  42. public function setSpeed($speed)
  43. {
  44. $this->speed = $speed;
  45. $this->apiParam["speed"] = $speed;
  46. }
  47. public function getScheduleTime()
  48. {
  49. return $this->scheduleTime;
  50. }
  51. public function setScheduleTime($scheduleTime)
  52. {
  53. $this->scheduleTime = $scheduleTime;
  54. $this->apiParam["schedule_time"] = $scheduleTime;
  55. }
  56. public function getApiParam()
  57. {
  58. if ($this->strategy != null){
  59. $this->apiParam["strategy"] = $this->strategy->getApiParam();
  60. }
  61. return $this->apiParam;
  62. }
  63. }