1 | <?php |
||
15 | final class SMSCHttpApiResponse implements SMSCApiResponseInterface |
||
16 | { |
||
17 | private $responseAttributes; |
||
18 | |||
19 | /** |
||
20 | * Create a message response. |
||
21 | * |
||
22 | * @param string $responseBody |
||
23 | */ |
||
24 | public function __construct($responseBody) |
||
28 | |||
29 | /** |
||
30 | * Get the error code of the SMSC Api. |
||
31 | * |
||
32 | * @return int |
||
33 | */ |
||
34 | public function errorCode() |
||
42 | |||
43 | /** |
||
44 | * Get the error message og the SMSC Api. |
||
45 | * |
||
46 | * @return null|string |
||
47 | */ |
||
48 | public function errorMessage() |
||
56 | |||
57 | /** |
||
58 | * Determine if the api responded with a success or not. |
||
59 | * |
||
60 | * @return bool |
||
61 | */ |
||
62 | public function isSuccess() |
||
66 | |||
67 | /** |
||
68 | * Read the message response body string. |
||
69 | * |
||
70 | * @param $responseBodyString |
||
71 | * @return array |
||
72 | */ |
||
73 | private function readResponseBodyString($responseBodyString) |
||
83 | } |
||
84 |