1 | <?php |
||
5 | class JSONRequest extends Request |
||
6 | { |
||
7 | /** |
||
8 | * @return array |
||
9 | */ |
||
10 | public static function getAllowedMethods() |
||
20 | |||
21 | /** |
||
22 | * @param string $source |
||
23 | * @return array|null |
||
24 | */ |
||
25 | public function getSource($source) |
||
29 | |||
30 | /** |
||
31 | * @param string|array $to |
||
32 | * @param string $from |
||
33 | * @param string $message |
||
34 | * @param array $params |
||
35 | * @return array|null |
||
36 | */ |
||
37 | public function send($to, $from, $message, $params = [ ]) |
||
52 | |||
53 | /** |
||
54 | * @param string $name |
||
55 | * @return array|null |
||
56 | */ |
||
57 | public function requestSource($name) |
||
61 | |||
62 | /** |
||
63 | * @param null|string $groupId |
||
64 | * @param null|string $phone |
||
65 | * @return array|null |
||
66 | */ |
||
67 | public function getContacts($groupId = null, $phone = null) |
||
74 | |||
75 | /** |
||
76 | * @param string $phone |
||
77 | * @return array|null |
||
78 | */ |
||
79 | public function getPhoneInfo($phone) |
||
83 | |||
84 | |||
85 | /** |
||
86 | * @param string $action |
||
87 | * @return string |
||
88 | */ |
||
89 | public function makeEndPoint($action) |
||
93 | |||
94 | /** |
||
95 | * @param array $requestBody |
||
96 | * @return mixed |
||
97 | */ |
||
98 | protected function formatRequestBody(array $requestBody) |
||
102 | |||
103 | /** |
||
104 | * @param string $response |
||
105 | * @return array |
||
106 | */ |
||
107 | protected function parseResponse($response) |
||
111 | } |