params_table.php 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <?php
  2. /**
  3. * Created by PhpStorm.
  4. * User: stanley-king
  5. * Date: 2017/12/4
  6. * Time: 上午11:06
  7. */
  8. namespace async;
  9. use Sms;
  10. class params_table
  11. {
  12. private $mSmstypeParams;
  13. private static $stInstance;
  14. private function __construct()
  15. {
  16. $this->mSmstypeParams = [];
  17. $this->mSmstypeParams[Sms::tpl_new_goods] = [
  18. 'type_bless' => '韩国品牌婵真上架,领红包,愉快购物~',
  19. 'type_name' => '购物红包',
  20. 'push_title' => "收到上新红包",
  21. 'push_text' => "韩国大牌 婵真 最新入驻,领50元红包,马上尝鲜~",
  22. 'push_url' => ""
  23. ];
  24. }
  25. static public function instance()
  26. {
  27. if(self::$stInstance == null) {
  28. self::$stInstance = new params_table();
  29. }
  30. return self::$stInstance;
  31. }
  32. public function find_params($sms_type)
  33. {
  34. if(array_key_exists($sms_type,$this->mSmstypeParams)) {
  35. return $this->mSmstypeParams[$sms_type];
  36. } else {
  37. return [];
  38. }
  39. }
  40. }