PushMessage.php 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214
  1. <?php
  2. namespace App\Libs\Push\OPPOPush;
  3. class PushMessage
  4. {
  5. private $app_message_id;
  6. private $style;
  7. private $big_picture_id;
  8. private $small_picture_id;
  9. private $title;
  10. private $sub_title;
  11. private $content;
  12. private $click_action_type;
  13. private $click_action_activity;
  14. private $click_action_url;
  15. private $action_parameters;
  16. private $show_time_type;
  17. private $show_start_time;
  18. private $show_end_time;
  19. private $off_line;
  20. private $off_line_ttl;
  21. private $push_time_type;
  22. private $push_start_time;
  23. private $time_zone;
  24. private $fix_speed;
  25. private $fix_speed_rate;
  26. private $network_type;
  27. private $call_back_url;
  28. private $call_back_parameter;
  29. private $channel_id;
  30. private $auth_token;
  31. public function app_message_id($value)
  32. {
  33. return $this->app_message_id = $value;
  34. }
  35. public function style($value)
  36. {
  37. return $this->style = $value;
  38. }
  39. public function big_picture_id($value)
  40. {
  41. return $this->big_picture_id = $value;
  42. }
  43. public function small_picture_id($value)
  44. {
  45. return $this->small_picture_id = $value;
  46. }
  47. public function title($value)
  48. {
  49. return $this->title = $value;
  50. }
  51. public function sub_title($value)
  52. {
  53. return $this->sub_title = $value;
  54. }
  55. public function content($value)
  56. {
  57. return $this->content = $value;
  58. }
  59. public function click_action_type($value)
  60. {
  61. return $this->click_action_type = $value;
  62. }
  63. public function click_action_activity($value)
  64. {
  65. return $this->click_action_activity = $value;
  66. }
  67. public function click_action_url($value)
  68. {
  69. return $this->click_action_url = $value;
  70. }
  71. public function action_parameters($value)
  72. {
  73. return $this->action_parameters = $value;
  74. }
  75. public function show_time_type($value)
  76. {
  77. return $this->show_time_type = $value;
  78. }
  79. public function show_start_time($value)
  80. {
  81. return $this->show_start_time = $value;
  82. }
  83. public function show_end_time($value)
  84. {
  85. return $this->show_end_time = $value;
  86. }
  87. public function off_line($value)
  88. {
  89. return $this->off_line = $value;
  90. }
  91. public function off_line_ttl($value)
  92. {
  93. return $this->off_line_ttl = $value;
  94. }
  95. public function push_time_type($value)
  96. {
  97. return $this->push_time_type = $value;
  98. }
  99. public function push_start_time($value)
  100. {
  101. return $this->push_start_time = $value;
  102. }
  103. public function time_zone($value)
  104. {
  105. return $this->time_zone = $value;
  106. }
  107. public function fix_speed($value)
  108. {
  109. return $this->fix_speed = $value;
  110. }
  111. public function fix_speed_rate($value)
  112. {
  113. return $this->fix_speed_rate = $value;
  114. }
  115. public function network_type($value)
  116. {
  117. return $this->network_type = $value;
  118. }
  119. public function call_back_url($value)
  120. {
  121. return $this->call_back_url = $value;
  122. }
  123. public function call_back_parameter($value)
  124. {
  125. return $this->call_back_parameter;
  126. }
  127. public function channel_id($value)
  128. {
  129. return $this->channel_id = $value;
  130. }
  131. public function auth_token($value)
  132. {
  133. return $this->auth_token = $value;
  134. }
  135. public function getData()
  136. {
  137. $keys = [
  138. 'style',
  139. 'type',
  140. 'title',
  141. 'content',
  142. 'click_action_type',
  143. 'click_action_activity',
  144. 'action_parameters',
  145. 'channel_id',
  146. 'auth_token'
  147. ];
  148. $result = [];
  149. foreach ($keys as $key) {
  150. if (isset($this->$key)) {
  151. $result[$key] = $this->$key;
  152. }
  153. }
  154. return $result;
  155. }
  156. }