1 | <?php |
||
9 | class ParasiticAgent extends Agent implements ContentSms, TemplateSms, VoiceCode, ContentVoice, TemplateVoice, FileVoice |
||
10 | { |
||
11 | protected static $methods; |
||
12 | |||
13 | protected $handlers = []; |
||
14 | |||
15 | public function __construct(array $config = [], array $handlers = []) |
||
21 | |||
22 | /** |
||
23 | * Content SMS send process. |
||
24 | * |
||
25 | * @param string|array $to |
||
26 | * @param string $content |
||
27 | */ |
||
28 | public function sendContentSms($to, $content) |
||
32 | |||
33 | /** |
||
34 | * Content voice send process. |
||
35 | * |
||
36 | * @param string|array $to |
||
37 | * @param string $content |
||
38 | */ |
||
39 | public function sendContentVoice($to, $content) |
||
43 | |||
44 | /** |
||
45 | * File voice send process. |
||
46 | * |
||
47 | * @param string|array $to |
||
48 | * @param int|string $fileId |
||
49 | */ |
||
50 | public function sendFileVoice($to, $fileId) |
||
54 | |||
55 | /** |
||
56 | * Template SMS send process. |
||
57 | * |
||
58 | * @param string|array $to |
||
59 | * @param int|string $tempId |
||
60 | * @param array $tempData |
||
61 | */ |
||
62 | public function sendTemplateSms($to, $tempId, array $tempData) |
||
66 | |||
67 | /** |
||
68 | * Template voice send process. |
||
69 | * |
||
70 | * @param string|array $to |
||
71 | * @param int|string $tempId |
||
72 | * @param array $tempData |
||
73 | */ |
||
74 | public function sendTemplateVoice($to, $tempId, array $tempData) |
||
78 | |||
79 | /** |
||
80 | * Voice code send process. |
||
81 | * |
||
82 | * @param string|array $to |
||
83 | * @param int|string $code |
||
84 | */ |
||
85 | public function sendVoiceCode($to, $code) |
||
89 | |||
90 | /** |
||
91 | * Handle send process by closure. |
||
92 | * |
||
93 | * @param $name |
||
94 | * @param array $args |
||
95 | */ |
||
96 | protected function handle($name, array $args = []) |
||
103 | |||
104 | /** |
||
105 | * Get methods name which inherit from interfaces. |
||
106 | * |
||
107 | * @return array |
||
108 | */ |
||
109 | public static function methods() |
||
121 | } |
||
122 |