| 1 | <?php |
||
| 5 | class JSONRequest extends Request |
||
| 6 | { |
||
| 7 | const BASE_URL = 'https://lcab.smsintel.ru/lcabApi/'; |
||
| 8 | |||
| 9 | /** |
||
| 10 | * @return array |
||
| 11 | */ |
||
| 12 | public static function getAllowedMethods() { |
||
| 17 | |||
| 18 | /** |
||
| 19 | * @param string $source |
||
| 20 | * @return array|null |
||
| 21 | */ |
||
| 22 | public function getSource($source) |
||
| 26 | |||
| 27 | /** |
||
| 28 | * @param string $action |
||
| 29 | * @return string |
||
| 30 | */ |
||
| 31 | protected function makeEndPoint($action) |
||
| 35 | |||
| 36 | /** |
||
| 37 | * @param array $requestBody |
||
| 38 | * @return mixed |
||
| 39 | */ |
||
| 40 | protected function formatRequestBody(array $requestBody) |
||
| 44 | |||
| 45 | /** |
||
| 46 | * @param string $response |
||
| 47 | * @return array |
||
| 48 | */ |
||
| 49 | protected function parseResponse($response) |
||
| 53 | } |