| @@ 164-174 (lines=11) @@ | ||
| 161 | * |
|
| 162 | * @return bool True if SMS was sent successfully, otherwise - false |
|
| 163 | */ |
|
| 164 | public function smsIsSentSuccessfully($messageId) |
|
| 165 | { |
|
| 166 | $response = $this->sendRequestToCheckStatusOfSMS($messageId); |
|
| 167 | ||
| 168 | $result = false; |
|
| 169 | if (isset($response['status']) && SmsStatus::SUCCESSFUL === $response['status']) { |
|
| 170 | $result = true; |
|
| 171 | } |
|
| 172 | ||
| 173 | return $result; |
|
| 174 | } |
|
| 175 | ||
| 176 | /** |
|
| 177 | * Returns true if SMS with some ID is still pending, otherwise returns false |
|
| @@ 183-193 (lines=11) @@ | ||
| 180 | * |
|
| 181 | * @return bool True if SMS is still pending, otherwise - false |
|
| 182 | */ |
|
| 183 | public function smsIsPending($messageId) |
|
| 184 | { |
|
| 185 | $response = $this->sendRequestToCheckStatusOfSMS($messageId); |
|
| 186 | ||
| 187 | $result = false; |
|
| 188 | if (isset($response['status']) && SmsStatus::PENDING === $response['status']) { |
|
| 189 | $result = true; |
|
| 190 | } |
|
| 191 | ||
| 192 | return $result; |
|
| 193 | } |
|
| 194 | ||
| 195 | /** |
|
| 196 | * Returns true if SMS with some ID was faulted, otherwise returns false |
|
| @@ 202-212 (lines=11) @@ | ||
| 199 | * |
|
| 200 | * @return bool True if SMS was faulted, otherwise - false |
|
| 201 | */ |
|
| 202 | public function smsIsFaulted($messageId) |
|
| 203 | { |
|
| 204 | $response = $this->sendRequestToCheckStatusOfSMS($messageId); |
|
| 205 | ||
| 206 | $result = false; |
|
| 207 | if (isset($response['status']) && SmsStatus::FAULTED === $response['status']) { |
|
| 208 | $result = true; |
|
| 209 | } |
|
| 210 | ||
| 211 | return $result; |
|
| 212 | } |
|
| 213 | ||
| 214 | /** |
|
| 215 | * Returns true if SMS with some ID in unknown status, otherwise returns false |
|
| @@ 221-231 (lines=11) @@ | ||
| 218 | * |
|
| 219 | * @return bool True if SMS in unknown status, otherwise - false |
|
| 220 | */ |
|
| 221 | public function smsInUnknownStatus($messageId) |
|
| 222 | { |
|
| 223 | $response = $this->sendRequestToCheckStatusOfSMS($messageId); |
|
| 224 | ||
| 225 | $result = false; |
|
| 226 | if (isset($response['status']) && SmsStatus::UNKNOWN === $response['status']) { |
|
| 227 | $result = true; |
|
| 228 | } |
|
| 229 | ||
| 230 | return $result; |
|
| 231 | } |
|
| 232 | ||
| 233 | // endregion |
|
| 234 | ||