Conditions | 2 |
Paths | 2 |
Total Lines | 24 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
23 | public function doSendRequest(array $options) |
||
24 | { |
||
25 | $request = new FormRequest(Request::METHOD_POST); |
||
26 | $request->fromUrl(static::HTTP_AccessPoint_Send); |
||
27 | $request->setFields(array('json' => json_encode($options))); |
||
28 | |||
29 | $response = new Response(); |
||
30 | $client = new FileGetContents(); |
||
31 | |||
32 | $client->send($request, $response); |
||
|
|||
33 | |||
34 | $json = $response->getContent(); |
||
35 | $status = json_decode($json, true); |
||
36 | |||
37 | if (!isset($status[static::Error_Code])) { |
||
38 | throw new InvalidResponseException('JSON response does not contain response code'); |
||
39 | } |
||
40 | |||
41 | $normalized_status = $status; |
||
42 | $normalized_status[self::NORMALIZED_MESSAGE] = $status[self::Error_Message]; |
||
43 | $normalized_status[self::NORMALIZED_CODE] = $status[self::Error_Code]; |
||
44 | |||
45 | return $normalized_status; |
||
46 | } |
||
47 | } |
||
48 |
This method has been deprecated. The supplier of the class has supplied an explanatory message.
The explanatory message should give you some clue as to whether and when the method will be removed from the class and what other method or class to use instead.