1 | <?php |
||
20 | class CodeMessage extends Message |
||
21 | { |
||
22 | /** |
||
23 | * @var |
||
24 | */ |
||
25 | protected $code; |
||
26 | /** |
||
27 | * @var |
||
28 | */ |
||
29 | protected $minutes; |
||
30 | |||
31 | protected $data; |
||
32 | |||
33 | /** |
||
34 | * CodeMessage constructor. |
||
35 | * |
||
36 | * @param $code |
||
37 | * @param $minutes |
||
38 | */ |
||
39 | 26 | public function __construct($code, $minutes, array $data = []) |
|
45 | |||
46 | /** |
||
47 | * 定义直接使用内容发送平台的内容. |
||
48 | * |
||
49 | * @param GatewayInterface|null $gateway |
||
50 | * |
||
51 | * @return string |
||
52 | */ |
||
53 | 22 | public function getContent(GatewayInterface $gateway = null) |
|
63 | |||
64 | /** |
||
65 | * 定义使用模板发送方式平台所需要的模板 ID. |
||
66 | * |
||
67 | * @param GatewayInterface|null $gateway |
||
68 | * |
||
69 | * @return mixed |
||
70 | */ |
||
71 | 22 | public function getTemplate(GatewayInterface $gateway = null) |
|
89 | |||
90 | /** |
||
91 | * @param GatewayInterface|null $gateway |
||
92 | * |
||
93 | * @return array |
||
94 | */ |
||
95 | 22 | public function getData(GatewayInterface $gateway = null) |
|
105 | } |
||
106 |